mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 12:47:13 +02:00
Fix a couple rare bugs around SSH sessions
This commit is contained in:
parent
4aab8224ed
commit
2f09f3e995
2 changed files with 13 additions and 6 deletions
|
@ -119,7 +119,10 @@ function shutdownSystem() {
|
|||
const activeConnections = ClientConns.getActiveConnections();
|
||||
let i = activeConnections.length;
|
||||
while(i--) {
|
||||
activeConnections[i].term.write('\n\nServer is shutting down NOW! Disconnecting...\n\n');
|
||||
const activeTerm = activeConnections[i].term;
|
||||
if(activeTerm) {
|
||||
activeTerm.write('\n\nServer is shutting down NOW! Disconnecting...\n\n');
|
||||
}
|
||||
ClientConns.removeClient(activeConnections[i]);
|
||||
}
|
||||
callback(null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue