Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Stream Health Monitoring and Improve Request Handling #4857

Merged
merged 3 commits into from
Feb 26, 2025

Conversation

GheisMohammadi
Copy link
Contributor

This PR introduces the monitorStreamHealth function to enhance the request manager's ability to detect and handle situations where no active streams are available. It acts as a watchdog by continuously checking the stream list and, if no connections remain for a predefined threshold, it cancels all pending requests to prevent overload and unnecessary waiting. This change helps ensure that requests do not remain indefinitely in the queue when no valid peers are reachable.

Additionally, a test has been added to verify that when all streams are removed, pending requests are correctly canceled with an appropriate error.

@sunwavesun sunwavesun self-requested a review February 26, 2025 02:57
@sophoah sophoah merged commit 1aba728 into dev Feb 26, 2025
4 checks passed
@sophoah sophoah deleted the improve/request_manager branch February 26, 2025 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants