Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
quic: fix socket-bound check in kMaybeBind
Browse files Browse the repository at this point in the history
PR-URL: #339
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
addaleax authored and jasnell committed Feb 11, 2020
1 parent 43d6752 commit e5d2d69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/quic/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ class QuicSocket extends EventEmitter {
// Function is a non-op if the socket is already bound or in the process of
// being bound, and will call the callback once the socket is ready.
[kMaybeBind](callback = () => {}) {
if (this.bound)
if (this.#state === kSocketBound)
return process.nextTick(callback);

this.once('ready', callback);
Expand Down

0 comments on commit e5d2d69

Please sign in to comment.