picoclaw/pkg/channels/whatsapp_native
Hoshina fc28c2660a fix(whatsapp_native): close TOCTOU race between eventHandler and Stop
Move the stopping check and wg.Add(1) inside reconnectMu in
eventHandler, and set the stopping flag under the same lock in Stop().
This makes the two operations atomic with respect to each other,
preventing the race where:
1. eventHandler checks stopping (false)
2. Stop() sets stopping=true and enters wg.Wait() (wg is 0)
3. eventHandler calls wg.Add(1) → panic or goroutine leak
2026-02-28 12:38:07 +08:00
..
init.go Complete the whatsapp native channel implementation based on the new channel interface 2026-02-26 22:35:52 -08:00
whatsapp_native.go fix(whatsapp_native): close TOCTOU race between eventHandler and Stop 2026-02-28 12:38:07 +08:00
whatsapp_native_stub.go chore: fix go fmt formatting issues after rebase 2026-02-27 17:35:50 +08:00