Don't set force parameter when running periodical poll
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 2 Feb 2010 07:10:25 +0000 (00:10 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 2 Feb 2010 07:22:27 +0000 (00:22 -0700)
imp/js/DimpBase.js

index 6fbbb9b..4c7e140 100644 (file)
@@ -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);
         }
     },