Closed isaacs closed 8 years ago
@isaacs take a look at https://github.com/npm/npm-registry-client/pull/142 if you want – and since you’re the one who wrote the req.on('socket')
bit… do you happen to know if that’s necessary? it seems node has pretty much always been forwarding socket errors to the HTTP objects.
@addaleax Ha! Yes, this is a duplicate, then. I'll go comment over there.
This is happening at this line in lib/request.js:
Because requests re-use those connections, you can end up attaching the error handler a lot of times.
It'd be good to remove it or something once we're done.
Apologies, this would be a PR instead of an issue but I didn't have time to dig in and figure out the best place to do that. Posting it this way so that it's not lost, like tears in rain.