summaryrefslogtreecommitdiffstats
path: root/event_test.go
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-02-07 21:22:51 -0800
committerbndw <ben@bdw.to>2026-02-07 21:22:51 -0800
commite79f9ad89556000521b43ce5ff4eb59dd00768b0 (patch)
tree9f8750e3c5431faf43fa672cb78a733a85d9dcfe /event_test.go
parentd4fd2467d691a69a0ba75348086424b9fb33a297 (diff)
refactor: race-safe Subscribe/Fetch API with channel-based Publish
- Add mutex-guarded send/stop on Subscription to prevent send-on-closed-channel panics and data races - Split Subscribe (streams after EOSE) and Fetch (closes on EOSE) per NIP-01 - Rewrite Publish to use channel-based OK dispatch instead of calling Receive directly, which raced with the auto-started Listen goroutine - Clean up all subscriptions when Listen exits so range loops terminate - Update tests and examples for new API
Diffstat (limited to 'event_test.go')
0 files changed, 0 insertions, 0 deletions