YUKI Hiroshi
null+****@clear*****
Tue Feb 5 16:34:33 JST 2013
YUKI Hiroshi 2013-02-05 16:34:33 +0900 (Tue, 05 Feb 2013) New Revision: 6b7f738fd598b50d3fd021597f3f78e6282a79ce https://github.com/groonga/express-kotoumi/commit/6b7f738fd598b50d3fd021597f3f78e6282a79ce Log: Make it easy to use mocked/stubbed connections for testing Modified files: index.js Modified: index.js (+4 -1) =================================================================== --- index.js 2013-02-05 16:27:09 +0900 (4c2df2b) +++ index.js 2013-02-05 16:34:33 +0900 (f915723) @@ -18,7 +18,10 @@ express.application.kotoumi = function(params) { if (params.server) { socketIoAdaptor.register(this, params.server, params); params.server.on('close', function() { - connection.close(); + // The connection can be mocked/stubbed. We don't need to close + // such a fake connection. + if (typeof connection.close == 'function') + connection.close(); }); } -------------- next part -------------- HTML����������������������������... Download