Open trick77 opened 12 years ago
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.
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.
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.