Preventing the WebSocket connection from trying to write enqueued frames to the socket if the connection is closed or closing.