RobertFischer / JQuery-PeriodicalUpdater

A port of Prototype's PeriodicalUpdater to JQuery
282 stars 50 forks source link

PeriodicalUpdater doesn't respect multiplier setting #5

Closed jamesbebbington closed 14 years ago

jamesbebbington commented 14 years ago

It looks like timerInterval is being reset to minTimeout on each AJAX call.

RobertFischer commented 14 years ago

This should happen if it errors out. The multiplier is only hit on success.

jamesbebbington commented 14 years ago

I was finding that the multiplier was being ignored for both error and success. I would have thought that it would make sense to respect the decay on error too as you probably wouldn't want the extra headache of your server getting hammered if errors are being generated.

RobertFischer commented 13 years ago

I don't consider "minTimeout" to be "hammering" the server. And since an error means the user isn't getting useful information, we'd like to ping reasonably often in case the server recovers.

If you want it to, you can just tell it to stop and then restart it after some timeout on error.