Callback in subscriber unsubscribe errors
This commit is contained in:
parent
c74f9bcce0
commit
67566c1d0e
@ -62,9 +62,11 @@ JobSubscriber.prototype.subscribe = function (onJobHandler, callback) {
|
||||
seeker(this.queueSeeker, onJobHandler, callback);
|
||||
};
|
||||
|
||||
JobSubscriber.prototype.unsubscribe = function () {
|
||||
JobSubscriber.prototype.unsubscribe = function (callback) {
|
||||
clearInterval(this.seekerInterval);
|
||||
if (this.client && this.client.connected) {
|
||||
this.client.unsubscribe(Channel.NAME);
|
||||
this.client.unsubscribe(Channel.NAME, callback);
|
||||
} else {
|
||||
return callback(null);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user