Merge pull request #1057 from dmitryuv/sync-processing
fix for error handling in the callback code
This commit is contained in:
commit
bedc51d2e3
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue