refactor: remove setImmediate (#10856)
This commit is contained in:
parent
72175906a5
commit
7f9c14c745
@ -51,12 +51,10 @@ export class NodeWebSocketTransport implements ConnectionTransport {
|
||||
constructor(ws: NodeWebSocket) {
|
||||
this.#ws = ws;
|
||||
this.#ws.addEventListener('message', event => {
|
||||
setImmediate(() => {
|
||||
if (this.onmessage) {
|
||||
this.onmessage.call(null, event.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
this.#ws.addEventListener('close', () => {
|
||||
if (this.onclose) {
|
||||
this.onclose.call(null);
|
||||
|
Loading…
Reference in New Issue
Block a user