From ac8ade6f247fadf76ecc71905350d3f5e6a482b5 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 2 Feb 2010 00:10:25 -0700 Subject: [PATCH] Don't set force parameter when running periodical poll --- imp/js/DimpBase.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/imp/js/DimpBase.js b/imp/js/DimpBase.js index 6fbbb9bc4..4c7e140b9 100644 --- a/imp/js/DimpBase.js +++ b/imp/js/DimpBase.js @@ -1471,8 +1471,9 @@ var DimpBase = { if (this.pollPE) { this.pollPE.stop(); } - // Don't cache - this code is only run once. - this.pollPE = new PeriodicalExecuter(this.poll.bind(this), DIMP.conf.refresh_time); + // Run in anonymous function, or else PeriodicalExecuter passes + // in itself as first ('force') parameter to poll(). + this.pollPE = new PeriodicalExecuter(function() { this.poll(); }.bind(this), DIMP.conf.refresh_time); } }, -- 2.11.0