diff --git a/lib/transports/polling-xhr.js b/lib/transports/polling-xhr.js index 25b79a5a..c80beec2 100644 --- a/lib/transports/polling-xhr.js +++ b/lib/transports/polling-xhr.js @@ -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(); }