fixes
This commit is contained in:
@@ -37,6 +37,8 @@ export function waitForSocketEvent(
|
||||
);
|
||||
}, timeoutMs);
|
||||
|
||||
let resolvedOnce = false;
|
||||
|
||||
function cleanup() {
|
||||
clearTimeout(timeout);
|
||||
resolvedOnce = true;
|
||||
@@ -44,8 +46,6 @@ export function waitForSocketEvent(
|
||||
wsClient.removeListener('error', (e) => rejector(e));
|
||||
}
|
||||
|
||||
let resolvedOnce = false;
|
||||
|
||||
function resolver(event) {
|
||||
resolve(event);
|
||||
cleanup();
|
||||
|
||||
Reference in New Issue
Block a user