Fix websocket_connect_sync