Skip to content

Commit

Permalink
Subscribe to the renamed transport events
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Aug 18, 2016
1 parent c5554cc commit 928957f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/transport-observer.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ const TransportObserver = Class(
transport.on("onBulkPacket", this.onBulkPacket);
transport.on("startBulkSend", this.startBulkSend);
transport.on("onClosed", this.onClosed);

transport.on("packet", this.onPacket);
transport.on("bulkpacket", this.onBulkPacket);
transport.on("startbulksend", this.startBulkSend);
transport.on("close", this.onClosed);
},

destroy: function() {
Expand All @@ -59,6 +64,11 @@ const TransportObserver = Class(
transport.off("onBulkPacket", this.onBulkPacket);
transport.off("startBulkSend", this.startBulkSend);
transport.off("onClosed", this.onClosed);

transport.off("packet", this.onPacket);
transport.off("bulkpacket", this.onBulkPacket);
transport.off("startbulksend", this.startBulkSend);
transport.off("close", this.onClosed);
},

// Connection Events
Expand Down

0 comments on commit 928957f

Please sign in to comment.