diff --git a/package.json b/package.json index b868f5d..b582b42 100644 --- a/package.json +++ b/package.json @@ -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": [ diff --git a/src/muxer.js b/src/muxer.js index 571746f..8c4542c 100644 --- a/src/muxer.js +++ b/src/muxer.js @@ -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) } }