Add session keep alive. If client doesn't send a keep alive, after a
specified amount of time the scheduler closes the session
This commit is contained in:
@@ -181,6 +181,8 @@
|
||||
|
||||
var socket = io({ path: '/sessions/' + sessionId + '/ws' });
|
||||
|
||||
|
||||
|
||||
socket.on('instance terminal status', function(name, status) {
|
||||
var instance = $scope.idx[name];
|
||||
instance.status = status;
|
||||
@@ -247,8 +249,11 @@
|
||||
socket.on('connect_error', function() {
|
||||
$scope.connected = false;
|
||||
});
|
||||
socket.on('connect', function() {
|
||||
socket.on('connect', function(s) {
|
||||
$scope.connected = true;
|
||||
setInterval(function() {
|
||||
socket.emit('session keep alive', 'keep me alive please! ' + new Date());
|
||||
}, 30*1000);
|
||||
});
|
||||
|
||||
socket.on('instance stats', function(stats) {
|
||||
|
||||
Reference in New Issue
Block a user