Repository navigation
Don't restart a controller that was already hidden for its session - #119
Open
mlopezsegura wants to merge 1 commit into
Open
mlopezsegura wants to merge 1 commit into
mlopezsegura wants to merge 1 commit into
Conversation
…session When a physical controller appeared while another session was running, OpenStreamMS restarted it so that session couldn't keep a handle it opened before the controller was hidden. But a known controller's HidHide jail stays in place while it's unplugged, asleep or re-enumerating, so when it comes back for the same session nobody else could have opened it, and the restart only shook a controller that was still starting. With a wired Elite 2, part of it came and went about once a minute (#11). Remember which session each physical node was jailed for, skip that restart when it reappears for the same one, and log every controller restart, including the ones that succeed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Related to #11 (wired Elite 2 dropping after about a minute).
When a physical controller appeared while another session was running,
HidePhysicalrestarted it, so that session couldn't keep a handle it opened in the first instant. But a known controller's HidHide jail stays in place while it's unplugged, asleep or re-enumerating (JailAbsent, and the jail isn't removed when the node goes away). So when it reappears for the same session, nobody else could have opened it, and the restart only shakes a controller that is still starting.In the reporter's bundle, the Elite 2's
045E:02FFpart re-enumerated about once a minute while a stream session was running, and successful restarts weren't logged, so OpenStreamMS couldn't be ruled out._jailedFor), and skip the restart when it reappears for the same one.Tests: full suite (210) passes; this path needs real devices and HidHide, so it has no unit test. Not tried with a GIP controller (none on this PC).
🤖 Generated with Claude Code