Merge pull request #1057 from dmitryuv/sync-processing

fix for error handling in the callback code
This commit is contained in:
Marcel Klehr 2012-10-11 08:08:47 -07:00
commit bedc51d2e3
1 changed files with 3 additions and 1 deletions

View File

@ -176,7 +176,9 @@ exports.handleMessage = function(client, message)
// Call handleMessage hook. If a plugin returns null, the message will be dropped. Note that for all messages // Call handleMessage hook. If a plugin returns null, the message will be dropped. Note that for all messages
// handleMessage will be called, even if the client is not authorized // handleMessage will be called, even if the client is not authorized
hooks.aCallAll("handleMessage", { client: client, message: message }, function ( messages ) { hooks.aCallAll("handleMessage", { client: client, message: message }, function ( err, messages ) {
if(ERR(err, callback)) return;
_.each(messages, function(newMessage){ _.each(messages, function(newMessage){
if ( newMessage === null ) { if ( newMessage === null ) {
dropMessage = true; dropMessage = true;