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 = Object.create(ChannelModule.prototype);
|
||||||
|
|
||||||
|
PollModule.prototype.unload = function () {
|
||||||
|
if (this.poll && this.poll.timer) {
|
||||||
|
clearTimeout(this.poll.timer);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
PollModule.prototype.load = function (data) {
|
PollModule.prototype.load = function (data) {
|
||||||
if ("poll" in data) {
|
if ("poll" in data) {
|
||||||
if (data.poll !== null) {
|
if (data.poll !== null) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue