lukeed / sockette

The cutest little WebSocket wrapper! 🧦
MIT License
2.45k stars 81 forks source link

Sockette.close can unexpectedly clear other timeouts/intervals #66

Open stevium opened 2 years ago

stevium commented 2 years ago

Since the first call to window.setTimeout or window.setInterval is returning handle with ID 1 calling Sockette.close would unexpectedly clear that timeout, because timer=1 is still a valid handle ID.