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

Commit

Permalink
feat: use pull-mplex (renamed from pull-plex)
Browse files Browse the repository at this point in the history
  • Loading branch information
dryajov committed Apr 15, 2018
1 parent 5235823 commit 9615da1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"async": "^2.6.0",
"debug": "^3.1.0",
"pull-abortable": "^4.1.1",
"pull-plex": "~0.0.1",
"pull-mplex": "~0.0.1",
"pull-stream": "^3.6.7"
},
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const MULTIPLEX_CODEC = require('./codec')
const pull = require('pull-stream')
const Mplex = require('pull-plex')
const Mplex = require('pull-mplex')
const abortable = require('pull-abortable')
const Muxer = require('./muxer')

Expand Down
3 changes: 1 addition & 2 deletions src/muxer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MultiplexMuxer extends EventEmitter {

multiplex.on('stream', (stream) => {
// install default error handler so that it doesn't throw
stream.once('error', (err) => {
stream.on('error', (err) => {
log.err('receiver stream errored', err)
})
this.emit('stream', new Connection(stream, this.conn))
Expand All @@ -40,7 +40,6 @@ class MultiplexMuxer extends EventEmitter {
log.err('initiator stream errored', err)
})
const conn = new Connection(stream, this.conn)
stream.openChan()
setImmediate(() => callback(null, conn))
return conn
}
Expand Down

0 comments on commit 9615da1

Please sign in to comment.