Kouhei Sutou
null+****@clear*****
Sat Jul 20 23:30:30 JST 2013
Kouhei Sutou 2013-07-20 23:30:30 +0900 (Sat, 20 Jul 2013) New Revision: dbc7f5f2122e3e69e20a49e62b786b04af218d09 https://github.com/groonga/express-droonga/commit/dbc7f5f2122e3e69e20a49e62b786b04af218d09 Message: receiver: accept callback on closed in close() It will be used in tests to remove wait(). Note1: MsgPackReceiver handles only one client. Is it OK? We doesn't need to handle multipe clients? Note2: Shuold the callback should wait until all clients are closed? Modified files: lib/backend/receiver.js Modified: lib/backend/receiver.js (+2 -2) =================================================================== --- lib/backend/receiver.js 2013-07-20 20:18:54 +0900 (fab96fe) +++ lib/backend/receiver.js 2013-07-20 23:30:30 +0900 (6e8791e) @@ -34,7 +34,7 @@ MsgPackReceiver.prototype.listen = function(callback) { } }; -MsgPackReceiver.prototype.close = function() { +MsgPackReceiver.prototype.close = function(callback) { if (this._messageStream) { this._messageStream = undefined; } @@ -43,7 +43,7 @@ MsgPackReceiver.prototype.close = function() { this._socket = undefined; } if (this._server) { - this._server.close(); + this._server.close(callback); this._server = undefined; } this.port = undefined; -------------- next part -------------- HTML����������������������������...Download