Digging further I noticed that when a client disconnects, the connection between the proxy and the backend seems to say alive, or at least the sockets do not get removed from the agent. From what I understand it is enough to close the socket to have it freed. For this I've tried to add the following listener:
I need to to some more testing but this seems to be working.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Digging further I noticed that when a client disconnects, the connection between the proxy and the backend seems to say alive, or at least the sockets do not get removed from the agent. From what I understand it is enough to close the socket to have it freed. For this I've tried to add the following listener:
function finish_request (reqhost, reqport, proxy_server, req, res, io_timeout, keep_alive_timeout) { ... res.addListener('close', function() { Logger.info("Client closed the connection"); preq.abort(); }); }
I need to to some more testing but this seems to be working.