1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-26 12:15:26 +00:00

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:
Asher 2020-10-30 13:38:13 -05:00
parent 0b9af6ef67
commit 07e7c38ea2
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -738,6 +738,8 @@ export class HttpServer {
}
private onUpgrade = async (request: http.IncomingMessage, socket: net.Socket, head: Buffer): Promise<void> => {
socket.pause()
try {
this.heart.beat()
socket.on("error", () => socket.destroy())