From 20f0d1c316eb76a1ed53bb8a088373bc618c127a Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Thu, 1 Aug 2013 22:47:38 -0400 Subject: [PATCH] Clear afk timer when disconnecting --- user.js | 1 + 1 file changed, 1 insertion(+) diff --git a/user.js b/user.js index c251a327..47d2c225 100644 --- a/user.js +++ b/user.js @@ -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));