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

fix(end): destroy all streams before ending #47

Merged
merged 2 commits into from
Dec 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,27 @@
"node": ">=4.0.0"
},
"devDependencies": {
"aegir": "^9.2.1",
"aegir": "^9.3.0",
"chai": "^3.5.0",
"gulp": "^3.9.1",
"interface-stream-muxer": "^0.5.0",
"libp2p-tcp": "^0.9.1",
"libp2p-websockets": "^0.9.0",
"multiaddr": "^2.0.3",
"pre-commit": "^1.2.0",
"libp2p-websockets": "^0.9.1",
"multiaddr": "^2.1.1",
"pre-commit": "^1.2.2",
"pull-file": "^1.0.0",
"pull-pair": "^1.1.0",
"pull-stream": "^3.5.0",
"run-parallel": "^1.1.6",
"tap-spec": "^4.1.1",
"tape": "^4.6.2"
"tape": "^4.6.3"
},
"dependencies": {
"browserify-zlib": "github:ipfs/browserify-zlib",
"interface-connection": "^0.3.0",
"lodash.noop": "^3.0.1",
"pull-stream-to-stream": "^1.3.3",
"spdy-transport": "^2.0.17",
"spdy-transport": "^2.0.18",
"stream-to-pull-stream": "^1.7.2"
},
"contributors": [
Expand Down
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)
}
}