Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
fix: do not end not started streams
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Jan 11, 2017
1 parent b802af9 commit fb8cb95
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/peer.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ class Peer {
// no connection to close
}
// end the pushable pull-stream
this.stream.end()
if (this.stream) {
this.stream.end()
}
setImmediate(() => {
this.conn = null
this.stream = null
Expand Down

0 comments on commit fb8cb95

Please sign in to comment.