meteor-client icon indicating copy to clipboard operation
meteor-client copied to clipboard

Fixed the alt manager's incidental limit of 3 Microsoft accounts.

Open 0xTas opened this issue 1 year ago • 1 comments

Type of change

  • [x] Bug fix
  • [ ] New feature

Description

This pr fixes the alt manager's incidental limit of 3 Microsoft accounts, which was occurring due to an API ratelimit during the process of loading accounts from disk. I accomplished this by moving usage of the fetchInfo() method out of Accounts#fromTag and relocating it to instead run when an account is actually logged into.

This prevents accounts beyond the 3rd from being thanos-snapped off the account list due to ratelimits on startup. You can still be ratelimited if you're switching between accounts too quickly, but if this happens just be patient, wait 30 seconds, try again and it will work.

Related issues

Closes https://github.com/MeteorDevelopment/meteor-client/issues/4054

How Has This Been Tested?

This was tested by adding more than 3 Microsoft accounts to the alt manager, closing and reopening the client, and then logging into and joining a server with each account in turn, to ensure the feature was working as expected. As a result of these changes, the alt manager can now support more than 3 accounts, which successfully persist through restarts.

Checklist:

  • [x] My code follows the style guidelines of this project.
  • [x] I have added comments to my code in more complex areas.
  • [x] I have tested the code in both development and production environments.

0xTas avatar Oct 12 '24 18:10 0xTas

Got it, I'll take another crack at it when I get some time.

0xTas avatar Oct 17 '24 00:10 0xTas

How does this look? I tested with Microsoft accounts and the slow login speeds and ratelimit issues seem to be fixed. However, I did not test with any altening accounts.

0xTas avatar Oct 24 '24 00:10 0xTas