antoniodipinto / ikisocket

🧬 WebSocket wrapper with event management for Fiber https://github.com/gofiber/fiber. Based on Fiber WebSocket and inspired by Socket.io
MIT License
123 stars 21 forks source link

Fix timer leak #15

Closed RamiBerm closed 3 years ago

RamiBerm commented 3 years ago

time.Tick is being called from inside a for loop, this ends up creating infinite timers which over time use up a lot of CPU. This should fix the issue by only creating one timer per loop

this is simillar to this issue from another repo

antoniodipinto commented 3 years ago

Thank you @RamiBerm the PR has been merged