Reduce realtime timeout and heartbeat interval to handle stale clients quicker
This commit is contained in:
parent
1df5b4ce49
commit
da7b6a340d
2 changed files with 3 additions and 3 deletions
|
@ -49,8 +49,8 @@ var sessionlife = config.sessionlife || 14 * 24 * 60 * 60 * 1000; //14 days
|
||||||
var staticcachetime = config.staticcachetime || 1 * 24 * 60 * 60 * 1000; // 1 day
|
var staticcachetime = config.staticcachetime || 1 * 24 * 60 * 60 * 1000; // 1 day
|
||||||
|
|
||||||
// socket.io
|
// socket.io
|
||||||
var heartbeatinterval = config.heartbeatinterval || 5000;
|
var heartbeatinterval = config.heartbeatinterval || 1000;
|
||||||
var heartbeattimeout = config.heartbeattimeout || 10000;
|
var heartbeattimeout = config.heartbeattimeout || 5000;
|
||||||
|
|
||||||
// document
|
// document
|
||||||
var documentmaxlength = config.documentmaxlength || 100000;
|
var documentmaxlength = config.documentmaxlength || 100000;
|
||||||
|
|
|
@ -2049,7 +2049,7 @@ function havePermission() {
|
||||||
//socket.io actions
|
//socket.io actions
|
||||||
var socket = io.connect({
|
var socket = io.connect({
|
||||||
path: urlpath ? '/' + urlpath + '/socket.io/' : '',
|
path: urlpath ? '/' + urlpath + '/socket.io/' : '',
|
||||||
timeout: 10000 //10 secs to timeout
|
timeout: 5000 //5 secs to timeout
|
||||||
});
|
});
|
||||||
//overwrite original event for checking login state
|
//overwrite original event for checking login state
|
||||||
var on = socket.on;
|
var on = socket.on;
|
||||||
|
|
Loading…
Reference in a new issue