Skip to content

Commit

Permalink
Merge pull request #76 from Marsup/master
Browse files Browse the repository at this point in the history
Bug when a request fails and a timeout is set
  • Loading branch information
mikeal committed Sep 11, 2011
2 parents f551a2f + 717789e commit 2b81e29
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.js
Expand Up @@ -148,6 +148,7 @@ Request.prototype.request = function () {

var clientErrorHandler = function (error) {
if (setHost) delete self.headers.host
if (self.timeout && self.timeoutTimer) clearTimeout(self.timeoutTimer)
self.emit('error', error)
}
if (self.onResponse) self.on('error', function (e) {self.onResponse(e)})
Expand Down

0 comments on commit 2b81e29

Please sign in to comment.