Remove properly the websocket handlers when they are disconnected