YUKI Hiroshi
null+****@clear*****
Fri Feb 8 19:04:41 JST 2013
YUKI Hiroshi 2013-02-08 19:04:41 +0900 (Fri, 08 Feb 2013) New Revision: e8ccfb1e8250a1d9b04e8115ed4145453b34c1e1 https://github.com/groonga/express-kotoumi/commit/e8ccfb1e8250a1d9b04e8115ed4145453b34c1e1 Log: Handle error for socket.io callback correctly Modified files: lib/frontend/socket.io-adaptor.js Modified: lib/frontend/socket.io-adaptor.js (+5 -0) =================================================================== --- lib/frontend/socket.io-adaptor.js 2013-02-08 18:59:46 +0900 (63166be) +++ lib/frontend/socket.io-adaptor.js 2013-02-08 19:04:41 +0900 (31d2f23) @@ -46,6 +46,11 @@ exports.register = function(application, server, params) { var options = {}; if (model.RequestResponse.isInstance(commandDefinition)) { callback = function(error, envelope) { + if (error) { + socket.emit('error', error); + return; + } + var event = envelope.type; var data = envelope.body; -------------- next part -------------- HTML����������������������������...Download