1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-07-14 18:27:25 +08:00

Increase session time

This commit is contained in:
Jonathan Leibiusky (@xetorthio) 2016-11-11 20:18:47 -03:00
parent d05fe56fea
commit 1be40005e8
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ func NewSession() (*Session, error) {
sessions[s.Id] = s
// Schedule cleanup of the session
time.AfterFunc(15*time.Second, func() {
time.AfterFunc(4*time.Hour, func() {
s = GetSession(s.Id)
s.Lock()
defer s.Unlock()

View File

@ -64,7 +64,7 @@
method: 'GET',
url: '/sessions/' + $scope.sessionId,
}).then(function(response) {
var socket = io({path: '/sessions/' + sessionId + '/ws'});
var socket = io({path: '/sessions/' + sessionId + '/ws', transports: ['polling']});
socket.on('terminal out', function(name, data) {
var instance = $scope.idx[name];