Fixing crash when sending data to a closed websocket connection.