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