Skip to content

Commit 07e7c38

Browse files
committed
Immediately pause web socket
This will buffer any data sent to it until something is ready to listen on it.
1 parent 0b9af6e commit 07e7c38

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/node/http.ts

+2
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ export class HttpServer {
738738
}
739739

740740
private onUpgrade = async (request: http.IncomingMessage, socket: net.Socket, head: Buffer): Promise<void> => {
741+
socket.pause()
742+
741743
try {
742744
this.heart.beat()
743745
socket.on("error", () => socket.destroy())

0 commit comments

Comments
 (0)