Fix: Use correct callback to prevent monitoring sending job from hanging.

This commit is contained in:
baldo 2016-06-29 11:28:39 +02:00
parent 69573e56c5
commit 3df5509df0

View file

@ -223,16 +223,16 @@ angular.module('ffffng')
Logger
.tag('monitoring', 'mail-sending')
.error('Error sending "' + name + '" mail for node: ' + mac, err);
return callback(err);
return mailCallback(err);
}
if (!node) {
Logger
.tag('monitoring', 'mail-sending')
.warn(
.debug(
'Node not found. Skipping sending of "' + name + '" mail: ' + mac
);
return callback(null);
return mailCallback(null);
}
if (node.monitoring && node.monitoringConfirmed) {