Improve writer task management and update ProtocolRequestHandler#45
Merged
rightup merged 3 commits intopyMC-dev:feat/companionfrom Mar 10, 2026
Merged
Improve writer task management and update ProtocolRequestHandler#45rightup merged 3 commits intopyMC-dev:feat/companionfrom
rightup merged 3 commits intopyMC-dev:feat/companionfrom
Conversation
Contributor
agessaman
commented
Mar 9, 2026
- Updated ProtocolRequestHandler to support PATH responses for flood request packets, consistent with the firmware. This returns the same data, but also gives the client a out_path to the repeater for subsequent requests to use DIRECT.
- Improved the task writer management to resolve issue #131 over on pyMC_repeater.
- Added some tests to ensure we get the proper PATH vs. RESPONSE packets in various scenarios.
- Added cancellation and awaiting of the old writer task to ensure proper cleanup before creating a new task. - Enhanced error handling to log exceptions from the writer task if it fails, improving debugging and stability during client disconnections.
- Refactored writer task management to use a local variable for improved readability and performance. - Simplified the condition checks for the writer task's state, enhancing code clarity and maintainability.
…n receiving REQ via flood - Updated response building logic to handle routing based on client out_path, ensuring correct packet types are returned. - Enhanced tests for ProtocolRequestHandler to validate response generation under various scenarios, including flood and direct requests.
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.