Skip to content
edgesync Check-in [1fe42a59e7]
Login

Check-in [1fe42a59e7]

Overview
Comment:fix(leaf/notify): mutex-gate Watch teardown to prevent send-on-closed-channel panic (#101)
Timelines: family | ancestors | descendants | both | trunk | leaf/v0.0.6
Files: files | file ages | folders
SHA3-256: 1fe42a59e7b17aaf5a4dd4c98b183a25588f6256bfcd9264325b4ba9f92b6553
User & Date: [email protected] on 2026-05-01 22:47:39.000
Other Links: manifest | tags
Context
2026-05-04
16:44
fix(leaf/notify): lock s.subs append/clear in Subscriber (#106)

Concurrent Subscribe/SubscribeThread callers raced on the unsynchronized append in subscribeReturn (and the iterate/clear in Unsubscribe), which the race detector flagged in downstream bones tests under -race -short.

Subscriber already had s.mu for dedup state — extending it to cover the subs slice is the cleanest fix. Unsubscribe snapshots the slice under the lock and iterates outside it so we never hold s.mu across NATS calls (the dispatch callback path takes s.mu via isDuplicate).

Adds a concurrent-Subscribe stress test that fires the race reliably under -race without the fix.

Closes #95 check-in: 0577a01d66 user: [email protected] tags: trunk

2026-05-01
22:47
fix(leaf/notify): mutex-gate Watch teardown to prevent send-on-closed-channel panic (#101) check-in: 1fe42a59e7 user: [email protected] tags: trunk, leaf/v0.0.6
22:20
fix(leaf): classify ErrNoResponders and ctx.Canceled as benign sync errors (#99) check-in: 8ca34471cd user: [email protected] tags: trunk, leaf/v0.0.5
Changes