Skip to content

Commit

Permalink
fix: return this from destroy and end (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jan 17, 2022
1 parent 34e65fa commit cba86e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,14 @@ class Wire extends stream.Duplex {
this._debug('destroy')
this.emit('close')
this.end()
return this
}

end (...args) {
this._debug('end')
this._onUninterested()
this._onChoke()
super.end(...args)
return super.end(...args)
}

/**
Expand Down

0 comments on commit cba86e5

Please sign in to comment.