Auto reconnect to log service, added buffering for logs for latest version#664
Merged
Muntasib-creator merged 2 commits intodevfrom Feb 25, 2026
Merged
Auto reconnect to log service, added buffering for logs for latest version#664Muntasib-creator merged 2 commits intodevfrom
Muntasib-creator merged 2 commits intodevfrom
Conversation
… and implement log buffering if server version 2.0.0 and up
Collaborator
Author
📚
|
Muntasib-creator
approved these changes
Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
Refactor/Feature
PR Checklist
Overview
This PR refactors the
live_log_service.pymodule to implement robust WebSocket reconnection logic with exponential backoff and introduces log buffering when connected to a server version 2.0.0 or later.The core changes are:
run_ws_thread) that continuously attempts to reconnect upon failure or close, utilizing an exponential backoff strategy (MIN_RECONNECT_DELAY_SECONDStoMAX_RECONNECT_DELAY_SECONDS).versionmessage from the server. If the server reports version2.0.0or higher, log messages are no longer sent individually but collected into a buffer.connect()is called with a new URL, the existing connection is immediately closed to switch to the new server instance.server_versionis reset toNoneupon connection closing/failure, aligning with the "reset server version on server change" commit.This enhancement improves stability during transient network issues and optimizes log transmission for modern server deployments.
Test Cases