Rewrite to use vanilla websocket, block on reconnect to prevent memory leak