emit err instead of req on error

This commit is contained in:
Mathias Buus 2014-03-28 00:34:53 +01:00
parent f6a17b14e3
commit f39d9d1c5e

View File

@ -117,7 +117,7 @@ Client.prototype._request = function (opts) {
})
req.on('error', function (err) {
self.emit('error', req)
self.emit('error', err)
})
})
}