Exclude suspended servers from node client connectivity checks (#2672)

This commit is contained in:
Charles authored and GitHub committed 2026-10-22 10:17:02 -04:00
1 parent b7ea6d260c
commit f64a167eea
1 file changed
+9
@@ -25,6 +25,15 @@
reject(new Error('ws_error'));
};
// Wings closes a suspended server's socket with 4409 before auth,
// which still proves the websocket reached Wings
ws.onclose = (event) => {
if (event.code === 4409) {
clearTimeout(timeout);
resolve();
}
};
ws.onopen = () => {
ws.send(JSON.stringify({ event: 'auth', args: ['{{ $wsToken }}'] }));
};