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

CommonClient: fix bug when using Connect button without a disconnect #3609

Merged
merged 2 commits into from
Jul 21, 2024

Conversation

qwint
Copy link
Contributor

@qwint qwint commented Jul 3, 2024

What is this fixing or adding?

makes the kivy connect button do the same username forgetting that /connect does to fix an issue where losing connection would make you unable to connect to a different server

How was this tested?

With two servers that have different valid slot names

  • connect to server1, enter slot name when prompted
  • close server1 to simulate the server losing connection for any reason
  • enter server2 server address (with just host:port), click Connect button
  • notice without the fix the connection is rejected for invalid slot (even without a prompt)
  • notice with the fix the client prompts for slot name and can connect without issue after inputting it

If this makes graphical changes, please attach screenshots.

…onnect does to fix an issue where losing connection would make you unable to connect to a different server
@github-actions github-actions bot added affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Jul 3, 2024
Copy link
Contributor

@Jouramie Jouramie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it could be considered as another bug (or not a bug at all), but I see that ctx.connect also set ctx.password. Should it also set to None?

Anyway, given this at least fix the issue when there is no password, LGTM.

kvui.py Outdated
@@ -599,6 +599,7 @@ def connect_button_action(self, button):
self.ctx.username = None
async_start(self.ctx.disconnect())
else:
self.ctx.username = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since self.ctx.username = None is in both branch of the if self.ctx.server, would it be better to extract it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't notice this haha, fixed

@qwint
Copy link
Contributor Author

qwint commented Jul 4, 2024

Maybe it could be considered as another bug (or not a bug at all), but I see that ctx.connect also set ctx.password. Should it also set to None?

Anyway, given this at least fix the issue when there is no password, LGTM.

invalid passwords trigger a different workflow where you can fix it, nothing (in that specific workflow) for clearing and fixing a slot, so I think that's fine

@Exempt-Medic Exempt-Medic added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Jul 10, 2024
Copy link
Member

@Exempt-Medic Exempt-Medic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged in and texted the changes which fixed a bug that consistently annoyed me

@Exempt-Medic Exempt-Medic added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Jul 20, 2024
Copy link
Member

@black-sliver black-sliver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks safe and I am gonna trust the 2 peer reviews.

The password thing is addressed in #3641

@black-sliver black-sliver merged commit 7039b17 into ArchipelagoMW:main Jul 21, 2024
17 checks passed
@qwint qwint deleted the kv_forget_slot branch July 21, 2024 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: core Issues/PRs that touch core and may need additional validation. is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants