Prevent Session loss when WebSocket could not be found, close #1644