Skip to content

Commit

Permalink
Add 'handled' and 'unhandled' events to Consumer
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Feb 1, 2018
1 parent 82ce07e commit e3c0800
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Consumer.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,14 @@ class Consumer extends EnhancedEventEmitter
this._internal = internal;
this._data = data;

this.safeEmit('handled');

transport.on('@close', () =>
{
this._internal.transportId = undefined;
this._data.transport = undefined;

this.safeEmit('unhandled');
});

return;
Expand Down

0 comments on commit e3c0800

Please sign in to comment.