Use correct event name in comment (error)

This commit is contained in:
Sander Declerck 2025-10-31 11:40:01 +01:00
parent df5c424a42
commit 4dc14397ad
No known key found for this signature in database

View file

@ -33,7 +33,7 @@ function tunnelRequestToDestination(req, clientSocket, head) {
clientSocket.on("error", () => { clientSocket.on("error", () => {
// This can happen if the client TCP socket sends RST instead of FIN. // This can happen if the client TCP socket sends RST instead of FIN.
// Not subscribing to 'close' event will cause node to throw and crash. // Not subscribing to 'error' event will cause node to throw and crash.
if (serverSocket.writable) { if (serverSocket.writable) {
serverSocket.end(); serverSocket.end();
} }