mirror of https://github.com/calzoneman/sync.git
Clear poll timer on channel unload
This commit is contained in:
parent
a3469378aa
commit
ac629d4b7f
|
@ -24,6 +24,12 @@ function PollModule(channel) {
|
|||
|
||||
PollModule.prototype = Object.create(ChannelModule.prototype);
|
||||
|
||||
PollModule.prototype.unload = function () {
|
||||
if (this.poll && this.poll.timer) {
|
||||
clearTimeout(this.poll.timer);
|
||||
}
|
||||
};
|
||||
|
||||
PollModule.prototype.load = function (data) {
|
||||
if ("poll" in data) {
|
||||
if (data.poll !== null) {
|
||||
|
|
Loading…
Reference in New Issue