Skip to content

Commit 2dc2812

Browse files
committed
[minor] Make sendAfterClose() call the callback in the next tick
1 parent fb1dfd2 commit 2dc2812

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/websocket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,7 @@ function sendAfterClose(websocket, data, cb) {
10961096
`WebSocket is not open: readyState ${websocket.readyState} ` +
10971097
`(${readyStates[websocket.readyState]})`
10981098
);
1099-
cb(err);
1099+
process.nextTick(cb, err);
11001100
}
11011101
}
11021102

0 commit comments

Comments
 (0)