Clear afk timer when disconnecting

This commit is contained in:
Calvin Montgomery 2013-08-01 22:47:38 -04:00
parent 4937dca98e
commit 20f0d1c316
1 changed files with 1 additions and 0 deletions

View File

@ -117,6 +117,7 @@ User.prototype.autoAFK = function () {
User.prototype.initCallbacks = function() {
this.socket.on("disconnect", function() {
this.awaytimer && clearTimeout(this.awaytimer);
if(this.channel != null)
this.channel.userLeave(this);
}.bind(this));