atproto utils for zig zat.dev
atproto sdk zig
Something went wrong. Try again.
firehose: optional shouldStop handler hook master
subscribe blocks forever by design, which is right for steady-state consumers but leaves bounded ones (bootstrap capture, tests, graceful shutdown) no clean exit: future.cancel lands inside a websocket read, surfaces as a connection error, and the reconnect loop absorbs it forever. a handler may now declare shouldStop() bool — checked before every frame and around every reconnect — and subscribe returns cleanly when it goes true. comptime-gated like onError/onRawFrame: handlers without the decl are byte-for-byte unchanged.
Author zzstoatzz Date (Jul 10, 2026, 3:12 PM UTC) Commit 0d42efda 0d42efda14edcdea47a3f04b297c33fcd777621c Parent 622f81d2 622f81d21be434201e629c5ca306f74313a8969f