Clear poll timer on channel unload

This commit is contained in:
Calvin Montgomery 2014-05-21 20:21:03 -07:00
parent a3469378aa
commit ac629d4b7f

View file

@ -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) {