Closed dscotese closed 2 years ago
setInterval can make multiple calls before the execution of the first call is complete. This problem is solved by having setInterval (at line 702 as of this comment) simply reduce a counter, The counter can go negative without any problem because report()
is only called when counter is zero. When report()
finally completes (since I just changed setInterval to call an async function so that report can be await
ed), the potentially very negative counter will be reset to the delay that is suppose to occur between calls. I believe this solves another problem which I have not added as a issue because it was difficult to describe (though I wrote about it here). The change is on the Bleeding branch.
If the bot is on auto, it will try again next time anyway, so it could give up once the waiting time it uses is over half of the delay setting.