Skip to content

Instantly share code, notes, and snippets.

@jugglinmike
Created October 27, 2012 23:16
Show Gist options
  • Save jugglinmike/3966818 to your computer and use it in GitHub Desktop.
Save jugglinmike/3966818 to your computer and use it in GitHub Desktop.
Modified Socket.io Transport.end
Transport.prototype.end = function (reason) {
console.log("Transport.end", { reason: reason, "this.disconnected": this.disconnected });
if (!this.disconnected) {
this.log.info('transport end (' + reason + ')');
var local = this.manager.transports[this.id];
this.close();
this.clearTimeouts();
this.disconnected = true;
this.manager.onClientDisconnect(this.id, reason, true);
this.store.publish('disconnect:' + this.id, reason);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment