Skip to content

Commit

Permalink
Merge pull request #819 from clayreimann/prevent-request-error-from-s…
Browse files Browse the repository at this point in the history
…quashing-response

Don't let request error override responses
  • Loading branch information
kornelski committed Dec 25, 2015
2 parents 33f2066 + e11119b commit 3768360
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,9 @@ Request.prototype.request = function(){
// because node will emit a faux-error "socket hang up"
// when request is aborted before a connection is made
if (self._aborted) return;
// if we've recieved a response then we don't want to let
// an error in the request blow up the response
if (self.response) return;
self.callback(err);
});

Expand Down

0 comments on commit 3768360

Please sign in to comment.