Skip to content

Commit 5a0c6f2

Browse files
fix test
1 parent 502b728 commit 5a0c6f2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/transports-uws/polling.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class Polling extends Transport {
9797
res.onAborted(onClose);
9898

9999
this.writable = true;
100-
this.emit("drain");
100+
this.emit("ready");
101101

102102
// if we're still writable but had a pending close, trigger an empty send
103103
if (this.writable && this.shouldClose) {
@@ -291,6 +291,7 @@ export class Polling extends Transport {
291291
debug('writing "%s"', data);
292292
this.doWrite(data, options, () => {
293293
this.req.cleanup();
294+
this.emit("drain");
294295
});
295296
}
296297

lib/transports-uws/websocket.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ export class WebSocket extends Transport {
6060
this.socket.send(data, isBinary, compress);
6161

6262
if (isLast) {
63-
this.writable = true;
6463
this.emit("drain");
64+
this.writable = true;
65+
this.emit("ready");
6566
}
6667
};
6768

0 commit comments

Comments
 (0)