Skip to content

Commit

Permalink
Revert "Workaround for GitHub issue #2807 (#2808)"
Browse files Browse the repository at this point in the history
This reverts commit 2bc3cc4.
  • Loading branch information
reconbot authored Dec 1, 2018
1 parent 2bc3cc4 commit 7748117
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions request.js
Original file line number Diff line number Diff line change
Expand Up @@ -878,16 +878,6 @@ Request.prototype.onRequestError = function (error) {
clearTimeout(self.timeoutTimer)
self.timeoutTimer = null
}

// This is a workaround for a race condition caused by the way that lib/redirect.js
// calls Request.init() when processing an HTTP redirect:
// https://github.com/request/request/issues/2807
// Somehow we end up with an ECONNRESET error from a socket that has already
// been destroyed and returned to the pool.
if (self.req && self.req.socket && self.req.socket.destroyed) {
return
}

self.emit('error', error)
}

Expand Down

0 comments on commit 7748117

Please sign in to comment.