Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Jun 21, 2024
1 parent 502b728 commit 5a0c6f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/transports-uws/polling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class Polling extends Transport {
res.onAborted(onClose);

this.writable = true;
this.emit("drain");
this.emit("ready");

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

Expand Down
3 changes: 2 additions & 1 deletion lib/transports-uws/websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ export class WebSocket extends Transport {
this.socket.send(data, isBinary, compress);

if (isLast) {
this.writable = true;
this.emit("drain");
this.writable = true;
this.emit("ready");
}
};

Expand Down

0 comments on commit 5a0c6f2

Please sign in to comment.