atproto utils for zig zat.dev
atproto sdk zig

jetstream: return error.Canceled from subscribe instead of reconnecting master

The reconnect loop treated every error out of connectAndRead as a dropped connection: it reported it to onError (or logged it), slept the backoff and connected again. That included error.Canceled from the connect, handshake, read loop and idle watchdog. std.Io delivers a cancel request to only the next cancellation point, so once the loop consumed it the backoff sleep ran normally and the client kept reconnecting, leaving the canceller's blocking cancel() waiting forever. subscribe already returns Io.Cancelable!void, so the error set is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>


+56
1 changed file