Wait until websocket is connected