Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't push twice for the same message to avoid race conditions #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
don't push twice for the same message to avoid race conditions
  • Loading branch information
ZabelTech committed Aug 20, 2024
commit 404925844b84585af91d608beb46ff04ab188efd
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,7 @@ class Wire extends Duplex {
view.setUint32(5 + (4 * i), numbers[i])
}

this._push(buffer)
if (data) this._push(data)
this._push(concat([buffer,data ?? []]))
}

_push (data) {
Expand Down