WebSocketClient: prevented null exception on disconnect.