Clear afk timer when disconnecting
This commit is contained in:
parent
4937dca98e
commit
20f0d1c316
1
user.js
1
user.js
|
|
@ -117,6 +117,7 @@ User.prototype.autoAFK = function () {
|
||||||
|
|
||||||
User.prototype.initCallbacks = function() {
|
User.prototype.initCallbacks = function() {
|
||||||
this.socket.on("disconnect", function() {
|
this.socket.on("disconnect", function() {
|
||||||
|
this.awaytimer && clearTimeout(this.awaytimer);
|
||||||
if(this.channel != null)
|
if(this.channel != null)
|
||||||
this.channel.userLeave(this);
|
this.channel.userLeave(this);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue