Skip to content

Commit 126cee0

Browse files
GlazerMannharshit-soora
authored andcommitted
reference ws instead of this (OSC#4721)
1 parent 0549455 commit 126cee0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/shell/app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,20 +254,20 @@ wss.on('connection', function connection (ws, req) {
254254
msg = JSON.parse(msg);
255255
if (msg.input) {
256256
term.write(msg.input);
257-
this.lastActivity = Date.now();
257+
ws.lastActivity = Date.now();
258258
}
259259
if (msg.resize) term.resize(parseInt(msg.resize.cols), parseInt(msg.resize.rows));
260260
});
261261

262262
ws.on('close', function () {
263263
term.end();
264-
this.isAlive = false;
264+
ws.isAlive = false;
265265
ws.logger.log('Closed terminal');
266266
ws.logger.flush();
267267
});
268268

269269
ws.on('pong', function () {
270-
this.isAlive = true;
270+
ws.isAlive = true;
271271
});
272272
}
273273
});

0 commit comments

Comments
 (0)