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

ECONNRESET

Open shabinaz opened this issue 9 years ago • 2 comments

I am using this library to post messages to APNS (Apple push notification server). I can successfully post and get esponses but when there is an ECONNRESET error (probably due to idle connection), it is neither caught at http2req.on with the request nor in the callback for the response with a response.on('error'.... Code snippet below:- callback = function (response) { .... response.on('error', function (){console.log("GET request error")}); res.end(); }); var req = http2.request(options, callback); req.write(http2Request.body); req.end(); req.on('error', (e) => { console.trace(e); throw e; });

I would like to catch the error so that I can handle the same without the node js client crashing.

shabinaz avatar Sep 06 '16 20:09 shabinaz

I too faced the same issue while using APNS after the connection was idle for very long time.

Error: write ECONNRESET

ghost avatar Oct 03 '16 07:10 ghost

me too

liutian avatar Oct 19 '16 02:10 liutian