mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-22 03:44:19 +01:00
Do not reconnect if process exited, fixes #50
This commit is contained in:
@@ -93,7 +93,8 @@
|
||||
}
|
||||
window.removeEventListener('beforeunload', unloadCallback);
|
||||
clearInterval(pingTimer);
|
||||
if (autoReconnect > 0) {
|
||||
// 1000: CLOSE_NORMAL
|
||||
if (event.code !== 1000 && autoReconnect > 0) {
|
||||
setTimeout(openWs, autoReconnect * 1000);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user