From c373f9f0e76d8ca5c3d5d922d56f9ea4c3024d07 Mon Sep 17 00:00:00 2001 From: MrGadget <9826063+MrGadget1024@users.noreply.github.com> Date: Fri, 15 Mar 2024 21:29:44 -0400 Subject: [PATCH] fix(SimpleWeb): scope websocket locally instead of globally --- .../SimpleWeb/SimpleWeb/Client/Webgl/plugin/SimpleWeb.jslib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Mirror/Transports/SimpleWeb/SimpleWeb/Client/Webgl/plugin/SimpleWeb.jslib b/Assets/Mirror/Transports/SimpleWeb/SimpleWeb/Client/Webgl/plugin/SimpleWeb.jslib index 02e6b936a..b4a612090 100644 --- a/Assets/Mirror/Transports/SimpleWeb/SimpleWeb/Client/Webgl/plugin/SimpleWeb.jslib +++ b/Assets/Mirror/Transports/SimpleWeb/SimpleWeb/Client/Webgl/plugin/SimpleWeb.jslib @@ -39,7 +39,7 @@ function Connect(addressPtr, openCallbackPtr, closeCallBackPtr, messageCallbackP const address = UTF8ToString(addressPtr); console.log("Connecting to " + address); // Create webSocket connection. - webSocket = new WebSocket(address); + var webSocket = new WebSocket(address); webSocket.binaryType = 'arraybuffer'; const index = SimpleWeb.AddNextSocket(webSocket);