3mpire / Seattle-Real-Time-Fire-911

Experimenting with Seattle Fire 911 data for fun.
MIT License
2 stars 0 forks source link

Clicking "Refresh" adds new 5 min timers instead of resetting timer. #1

Closed 3mpire closed 10 years ago

3mpire commented 10 years ago

When clicking the "Refresh" button an AJAX call is made. Upon completion setTimeout is called and will wait 5 min before calling log.RefreshData(). The intended behavior is to have the feed update automatically after five minutes, but the result is multiple timers are running. So if you click "Refresh" once every ten seconds three times, in five minutes the data will refresh once every ten seconds three times (thus re-adding another call in five minutes infinitely).