diff --git a/lib/connectors/commands/handshake.js b/lib/connectors/commands/handshake.js index e575ba83f..3ed7163cd 100644 --- a/lib/connectors/commands/handshake.js +++ b/lib/connectors/commands/handshake.js @@ -23,6 +23,10 @@ var Command = function(opts) { this.heartbeat = opts.heartbeat * 1000; } + if(opts.timeout){ + this.timeout = opts.timeout; + } + this.checkClient = opts.checkClient; this.useDict = opts.useDict; @@ -44,6 +48,10 @@ Command.prototype.handle = function(socket, msg) { heartbeat : setupHeartbeat(this) }; + if(this.timeout){ + opts.timeout = this.timeout; + } + if(this.useDict) { var dictVersion = pomelo.app.components.__dictionary__.getVersion(); if(!msg.sys.dictVersion || msg.sys.dictVersion !== dictVersion){ @@ -53,7 +61,7 @@ Command.prototype.handle = function(socket, msg) { opts.routeToCode = pomelo.app.components.__dictionary__.getDict(); opts.codeToRoute = pomelo.app.components.__dictionary__.getAbbrs(); - opts.dictVersion = dictVersion; + opts.dictVersion = dictVersion; } opts.useDict = true; }