mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
e70a9fca7c
The Stop() method previously used a select/default pattern which was not safe under concurrent calls — two goroutines could both pass the check and attempt to close the same channel, causing a panic. Replace with sync.Once to guarantee exactly-once close semantics, matching the documented contract of being safe for concurrent use. Review feedback: afjcjsbx