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

Commit

Permalink
fix: verify drain before new push (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos authored Oct 1, 2018
1 parent bb5b7c0 commit cd77e01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/libp2p/js-libp2p-mplex#readme",
"devDependencies": {
"aegir": "^14.0.0",
"aegir": "^15.2.0",
"chai": "^4.1.2",
"dirty-chai": "^2.0.1",
"interface-stream-muxer": "~0.5.9",
Expand Down
2 changes: 1 addition & 1 deletion src/internals/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class Multiplex extends stream.Duplex {
used = 0
}

if (data) {
if (data && drained) {
drained = this.push(data)
}

Expand Down

0 comments on commit cd77e01

Please sign in to comment.