If you set a responseTimeout on a request, and then, before the responseTimeout has elapsed, the request has an error (e.g. connection timeout), then the responseTimeout timer is not cleared.
This can cause issues like a hanging process, or memory leaks.
I believe it just needs adding a clearTimeout in the req.on("error") handler
If you set a
responseTimeouton a request, and then, before the responseTimeout has elapsed, the request has an error (e.g. connection timeout), then the responseTimeout timer is not cleared.This can cause issues like a hanging process, or memory leaks.
I believe it just needs adding a
clearTimeoutin thereq.on("error")handler