YUKI Hiroshi
null+****@clear*****
Wed Oct 22 17:57:12 JST 2014
YUKI Hiroshi 2014-10-22 17:57:12 +0900 (Wed, 22 Oct 2014) New Revision: 1b3147a5a765080b32ce6dd0231517b1131a95d5 https://github.com/droonga/express-droonga/commit/1b3147a5a765080b32ce6dd0231517b1131a95d5 Message: Ignore callback function call on irregular case Modified files: lib/droonga-protocol/receiver.js Modified: lib/droonga-protocol/receiver.js (+6 -1) =================================================================== --- lib/droonga-protocol/receiver.js 2014-10-22 17:52:37 +0900 (f31c01c) +++ lib/droonga-protocol/receiver.js 2014-10-22 17:57:12 +0900 (5eba0f3) @@ -47,7 +47,12 @@ MsgPackReceiver.prototype.listen = function(callback) { this._server.listen(this.port, callback); } else { var stack = new Error().stack; - this._server.listen((function() { + this._server.listen((function(error) { + // This function can be called after this receiver is closed, + // if the server couldn't connect. + if (!this._server) + return; + try { this.port = this._server.address().port; callback(); -------------- next part -------------- HTML����������������������������...Download