Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Commit

Permalink
fix(end): destroy all streams before ending
Browse files Browse the repository at this point in the history
Otherwise we will wait for the other side to end
  • Loading branch information
dignifiedquire committed Dec 16, 2016
1 parent d967b20 commit 5cea518
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/muxer.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,18 @@ module.exports = class Muxer extends EventEmitter {
path: '/',
headers: {}
}, (err, stream) => {
if (err) {
return callback(err)
}
conn.setInnerConn(toPull.duplex(stream), this.conn)
callback(err, conn)
callback(null, conn)
})

return conn
}

end (cb) {
this.spdy.destroyStreams()
this.spdy.end(cb)
}
}

0 comments on commit 5cea518

Please sign in to comment.