From a7cfb8b1bbcdb7fd280907ff53c2997d1b5ee096 Mon Sep 17 00:00:00 2001 From: David Dias Date: Tue, 24 Jan 2017 00:42:35 +0000 Subject: [PATCH] fix: dropped packed --- package.json | 4 ++-- src/index.js | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 905c514..54319a4 100644 --- a/package.json +++ b/package.json @@ -29,9 +29,9 @@ }, "homepage": "https://github.com/libp2p/js-libp2p-multiplex#readme", "devDependencies": { - "aegir": "^9.3.2", + "aegir": "^9.3.3", "chai": "^3.5.0", - "interface-stream-muxer": "^0.5.4", + "interface-stream-muxer": "^0.5.5", "libp2p-websockets": "^0.9.1", "pre-commit": "^1.2.2", "pull-pair": "^1.1.0" diff --git a/src/index.js b/src/index.js index 15cfed0..8e5cfb0 100644 --- a/src/index.js +++ b/src/index.js @@ -10,8 +10,6 @@ const pump = require('pump') function create (rawConn, isListener) { const stream = toStream(rawConn) - // Let it flow, let it flooow - stream.resume() stream.on('end', () => { // Cleanup and destroy the connection when it ends @@ -21,8 +19,7 @@ function create (rawConn, isListener) { }) const mpx = multiplex() - pump(mpx, stream) - pump(stream, mpx) + pump(stream, mpx, stream) return new Muxer(rawConn, mpx, isListener) }