node-http2 icon indicating copy to clipboard operation
node-http2 copied to clipboard

ECONNRESET not handled

Open mihai1voicescu opened this issue 9 years ago • 1 comments

There was an issue in Node.js regarding keepAlive connections when the ECONNRESET occurred. This was fixed (https://github.com/nodejs/node/issues/3595) but it involved adding a new 'error' listener on a free socket. The problem is you remove this protection after the protocol negotiation: https://github.com/molnarg/node-http2/blob/master/lib/http.js#L969

Normally another protection is added when the stream ends by Node.js (https://github.com/nodejs/node/blob/master/lib/_http_client.js#L500), but this event does not occur. Maybe because the stream in the http2 connection never ends (not sure about this maybe you can clear this up).

And by the way @felicienfrancois resolved some pretty important issues regarding the client side and Agent option. You should really consider integrating his pull requests.

mihai1voicescu avatar Apr 08 '16 12:04 mihai1voicescu

I also encountered the same problem

clarencetw avatar Jun 27 '16 09:06 clarencetw