diff --git a/lib/transports/xhr.js b/lib/transports/xhr.js index 75c55d36..3a1002ed 100644 --- a/lib/transports/xhr.js +++ b/lib/transports/xhr.js @@ -130,6 +130,18 @@ this.sendXHR.send(data); }; + + /** + * Disconnects the established `XHR` connection. + * + * @returns {Transport} + * @api public + */ + + XHR.prototype.close = function () { + this.onClose(); + return this; + }; /** * Handle the disconnect request.