Finish the websocket of online and offline.