| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The retry count of GrpcStreamBroadcaster was never reset, so a retry limit counted every retry over the life of the stream. A long-running stream with a limit gave up after that many lost connections, even when it had recovered from each one. Reset the count when a message arrives, so a limit counts the retries since the last message. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
A server stream that stays open without sending blocked its consumers forever. Cancel such a call and retry it like a failed one. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Abandoned streams kept retrying forever, so abandoned broadcasters piled up calls during outages. Track the receivers handed out and stop once all are closed or dropped, also while stalled or retrying. Also end the receivers on any exit of the stream: an unexpected error left them waiting forever. Now they end, and receivers with events get a StreamFatalError. And let stop() pass on a cancellation of its caller, which it used to swallow. A receiver with events requested after the stream stopped now ends at once too. If no receiver with events existed before, it used to wait on a new event channel that was never closed. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Some clients reuse a cached broadcaster without checking is_running, so a stream stopped for lack of receivers would hand them a receiver that ends without data. Start a new run instead. Each run already closes only its own channels, so the old run winding down cannot end the new run's receivers. A stream that ended, gave up or failed by itself is not restarted. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
| Back | FazBrowse Home | New Git URL |
After a reporting API outage, forecast streams stayed dead until a restart: a stalled call was never noticed, and abandoned broadcasters kept retrying forever. This adds an idle timeout to GrpcStreamBroadcaster, stops a broadcaster once every receiver it handed out is gone, and starts it again on the next new_receiver().
Changes
Breaking