mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
ui: message worker: fix leak
This commit is contained in:
1 file changed
+1
@@ -33,6 +33,7 @@ function initConn(path: string, port: MessagePort, cookie: any) {
|
||||
else if (conn && conn.readyState === conn.OPEN) return;
|
||||
lcookie = cookie;
|
||||
console.log('Init connection for', path);
|
||||
conn?.close();
|
||||
conn = new ReconnectingWebsocket(path);
|
||||
ports.push(port);
|
||||
conn.onopen = () => conn.send(cookie);
|
||||
|
||||
Reference in new issue
Block a user