Avoid re-sending already sent messages when the channel is closed.