-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Hi,
Thanks for sharing this awesome piece of code (and the funny story around it).
It looks like there's a potential connection leak if the socket (for whatever reason) is gone.
clientSocket.on('data', function (data) {
try {
socket.write(data);
} catch (error) {
try {
clientSocket.end();
} catch (error) {}
emitter.emit('error', error, 'httpsSocketData');
}
});
If socket.write throws an exception like "This socket is closed", the socket will show up as ESTABLISHED or FIN_WAIT2 until Node.js is being restarted. I've been unable to get rid of the socket, even socket.destroy() won't help.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels