Make sure to conserve the error on Request#onError

This commit is contained in:
Guillermo Rauch
2012-01-03 13:23:15 -08:00
parent 72236e944d
commit dab713aafe

View File

@@ -228,8 +228,8 @@ Request.prototype.onData = function (data) {
* @api private
*/
Request.prototype.onError = function () {
this.emit('error');
Request.prototype.onError = function (err) {
this.emit('error', err);
this.cleanup();
}