Immediately pause web socket
This will buffer any data sent to it until something is ready to listen on it.
This commit is contained in:
parent
0b9af6ef67
commit
07e7c38ea2
@ -738,6 +738,8 @@ export class HttpServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private onUpgrade = async (request: http.IncomingMessage, socket: net.Socket, head: Buffer): Promise<void> => {
|
private onUpgrade = async (request: http.IncomingMessage, socket: net.Socket, head: Buffer): Promise<void> => {
|
||||||
|
socket.pause()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.heart.beat()
|
this.heart.beat()
|
||||||
socket.on("error", () => socket.destroy())
|
socket.on("error", () => socket.destroy())
|
||||||
|
Loading…
Reference in New Issue
Block a user