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:
parent
d05fe56fea
commit
1be40005e8
@ -59,7 +59,7 @@ func NewSession() (*Session, error) {
|
|||||||
sessions[s.Id] = s
|
sessions[s.Id] = s
|
||||||
|
|
||||||
// Schedule cleanup of the session
|
// Schedule cleanup of the session
|
||||||
time.AfterFunc(15*time.Second, func() {
|
time.AfterFunc(4*time.Hour, func() {
|
||||||
s = GetSession(s.Id)
|
s = GetSession(s.Id)
|
||||||
s.Lock()
|
s.Lock()
|
||||||
defer s.Unlock()
|
defer s.Unlock()
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: '/sessions/' + $scope.sessionId,
|
url: '/sessions/' + $scope.sessionId,
|
||||||
}).then(function(response) {
|
}).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) {
|
socket.on('terminal out', function(name, data) {
|
||||||
var instance = $scope.idx[name];
|
var instance = $scope.idx[name];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user