Skip to content

Commit

Permalink
[minor] Make sendAfterClose() call the callback in the next tick
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Dec 20, 2022
1 parent fb1dfd2 commit 2dc2812
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ function sendAfterClose(websocket, data, cb) {
`WebSocket is not open: readyState ${websocket.readyState} ` +
`(${readyStates[websocket.readyState]})`
);
cb(err);
process.nextTick(cb, err);
}
}

Expand Down

0 comments on commit 2dc2812

Please sign in to comment.