Raised the default socket timeout and other minor changes
This commit is contained in:
+6
-6
@@ -83,14 +83,14 @@ function resetEnqLinkTimer() {
|
|||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
log.silly('larvitsmpp: lib/server.js: resetEnqLinkTimer() - Resetting the kill timer');
|
log.silly('larvitsmpp: lib/server.js: resetEnqLinkTimer() - Resetting the kill timer');
|
||||||
if (this.enqLinkTimer) {
|
if (that.enqLinkTimer) {
|
||||||
clearTimeout(this.enqLinkTimer);
|
clearTimeout(that.enqLinkTimer);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.enqLinkTimer = setTimeout(function() {
|
that.enqLinkTimer = setTimeout(function() {
|
||||||
log.info('larvitsmpp: lib/server.js: resetEnqLinkTimer() - Closing session due to timeout');
|
log.info('larvitsmpp: lib/server.js: resetEnqLinkTimer() - Closing session from ' + that.sock.remoteAddress + ':' + that.sock.remotePort + ' due to timeout');
|
||||||
that.closeSocket();
|
that.closeSocket();
|
||||||
}, this.options.timeout);
|
}, that.options.timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -154,7 +154,7 @@ function server(options, callback) {
|
|||||||
// Set default options
|
// Set default options
|
||||||
options = merge({
|
options = merge({
|
||||||
'port': 2775,
|
'port': 2775,
|
||||||
'timeout': 30000 // 30 sec
|
'timeout': 40000 // 40 sec
|
||||||
}, options || {});
|
}, options || {});
|
||||||
|
|
||||||
// Create a server instance, and chain the listen function to it
|
// Create a server instance, and chain the listen function to it
|
||||||
|
|||||||
Reference in New Issue
Block a user