Files
cc-connect/core
Shawn 8ec95a280c fix(core): prevent infinite loop in drainEvents on closed channel (#152)
drainEvents uses a select loop with a default case to drain buffered
events. When the channel is closed, receives always succeed immediately
with a zero value, so the default case never triggers and the function
spins in an infinite loop, consuming 100% CPU.

Check the ok value from the receive and return immediately when the
channel is closed. Add regression tests for both closed and open
channel scenarios.
2026-03-15 19:19:53 +08:00
..
2026-03-13 15:28:33 +11:00
2026-02-28 10:38:24 +08:00