mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
Update server.js
This commit is contained in:
parent
5ecae71561
commit
52738f5fc7
1 changed files with 3 additions and 5 deletions
|
@ -149,11 +149,9 @@ wss.on('connection', (ws, req) => {
|
|||
// Ensure pty is killed when websocket is closed and vice versa
|
||||
pty.on('exit', () => {
|
||||
console.log(`Ended pty (${pty.pid})`);
|
||||
// if (ws.OPEN) {
|
||||
// ws.close();
|
||||
// }
|
||||
pty.kill();
|
||||
wss.clients.delete(ws);
|
||||
if (ws.OPEN) {
|
||||
ws.close();
|
||||
}
|
||||
});
|
||||
ws.on('close', () => {
|
||||
console.log(`Ended connection from ${remoteIP} (${sessionID})`);
|
||||
|
|
Loading…
Reference in a new issue