-
Notifications
You must be signed in to change notification settings - Fork 723
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
SNIClient: fix /snes command if tree #791
Conversation
Looks like when using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops. See @black-sliver's comment.
maybe to show what i mean:
I believe the old "reconnect loop" remembers what it initially used and does not get cancelled. |
is this still the case after the /main merge? |
yes, unless i screwed up the merging, that's what i did for the output above |
ant then another
But it never connects to 8080 afaict, and is effectively stuck at the "wrong" SNI |
Assuming this is still an issue, it might be time to move this to an Issue, as it doesn't seem related to the PRs change |
@@ -68,12 +68,11 @@ def connect_to_snes(self, snes_options: str = "") -> bool: | |||
options = snes_options.split() | |||
num_options = len(options) | |||
|
|||
if num_options > 0: | |||
snes_device_number = int(options[0]) | |||
|
|||
if num_options > 1: | |||
snes_address = options[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to fix the problem reported by black-sliver
snes_address = options[0] | |
snes_address = self.ctx.snes_address = options[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Independently of the additional fix suggestion above, I can confirm that with this PR the two-argument version of /snes no longer causes an exception due to trying to parse an URI as a number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasted another hour on the connect code. I think I will write it here and stop caring now.
Basically,
- snes_device_number gets thrown away for reconnect (i.e. user has to start SNI first)
- connect address gets thrown away for reconnect (fixed by el-u's change)
- i believe the use of snes_reconnect_address in combination with /snes is unexpected.
- connect will get stuck if there are no snes devices on the connected SNI - so /snes to switch hosts requires the user to exit the SNI that SNIClient is already connected to
- duplicate logger line (because we have two connections to SNI)
Here is the text on Discord for reference:
https://discord.com/channels/731205301247803413/731214280439103580/1131490109703852062
--
(I don't think there is value in enabling this broken command by fixing the arg parsing, but since el-u and berserker think differently, I'll approve in the sense that this PR fixes the arg parsing and nothing else.)
No description provided.