From 8facc865ab2ec032da34f6f755ee8870ee4741aa Mon Sep 17 00:00:00 2001 From: sirpy Date: Mon, 18 Jan 2021 21:55:58 -0800 Subject: [PATCH] fix: save connection url as class variable Summary: Conform with Websocket javascript api. related to web3js issues: https://github.com/ethereum/web3.js/issues/2864 https://github.com/ethereum/web3.js/issues/2602 Reviewed By: javache Differential Revision: D25927475 Pulled By: TheSavior fbshipit-source-id: 26b2df0565dac581d546b6824dd4f0fc2c8cdc32 --- Libraries/WebSocket/WebSocket.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/WebSocket/WebSocket.js b/Libraries/WebSocket/WebSocket.js index 7975508604c..fa2b8260eb7 100644 --- a/Libraries/WebSocket/WebSocket.js +++ b/Libraries/WebSocket/WebSocket.js @@ -97,6 +97,7 @@ class WebSocket extends (EventTarget(...WEBSOCKET_EVENTS): any) { options: ?{headers?: {origin?: string, ...}, ...}, ) { super(); + this.url = url; if (typeof protocols === 'string') { protocols = [protocols]; }