Skip to content

Commit

Permalink
fix(deffered-attach): missed this references during promisification
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Jul 16, 2015
1 parent 47e3a98 commit e4f6023
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/amqp_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,20 +283,20 @@ AMQPClient.prototype.createSender = function(address, options) {
link.on(Link.ErrorReceived, function(err) {
self.emit(AMQPClient.ErrorReceived, err);

this._resolveDeferredSenderAttaches(linkName, err);
self._resolveDeferredSenderAttaches(linkName, err);
reject(err);
});

link.on(Link.Detached, function(details) {
debug('sender link detached: ' + (details ? details.error : 'No details'));
self._attached[linkName] = undefined;

this._resolveDeferredSenderAttaches(linkName, details);
self._resolveDeferredSenderAttaches(linkName, details);
reject(details);
});

// return the attached link
this._resolveDeferredSenderAttaches(linkName, null, link);
self._resolveDeferredSenderAttaches(linkName, null, link);
resolve(link);
};
self.on(AMQPClient.LinkAttached, onAttached);
Expand Down

0 comments on commit e4f6023

Please sign in to comment.