Skip to content

Commit

Permalink
Revert "Workaround for GitHub issue request#2807 (request#2808)" (req…
Browse files Browse the repository at this point in the history
…uest#3075)

This reverts commit 2bc3cc4.
  • Loading branch information
reconbot authored Dec 1, 2018
1 parent 2bc3cc4 commit b3926a3
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 b3926a3

Please sign in to comment.