brainboxdotcc / DPP

C++ Discord API Bot Library - D++ is Lightweight and scalable for small and huge bots!
https://dpp.dev/
Apache License 2.0
1.05k stars 159 forks source link

Accessing deleted timer in cluster::tick_timers #1048

Closed rept1d closed 7 months ago

rept1d commented 9 months ago

Git commit reference c9bfdeb532c874a844d67dd93eea2485361e3a5d

Describe the bug If cluster::tick_timers is executed simultaneously with cluster::stop_timer, it's possible that when you loop over scheduled (in tick_timers) you end up with a deleted timer_t*.

Expected behavior A timer should only be ticked and rescheduled if it was not deleted.

braindigitalis commented 7 months ago

creating a PR for this.