fix(SimpleWeb): scope websocket locally instead of globally

This commit is contained in:
MrGadget 2024-03-15 21:29:44 -04:00
parent 714f231d43
commit c373f9f0e7

View File

@ -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);