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

Take the update checker off the main thread please #310

Open
ZepsiZola opened this issue Mar 28, 2024 · 1 comment
Open

Take the update checker off the main thread please #310

ZepsiZola opened this issue Mar 28, 2024 · 1 comment

Comments

@ZepsiZola
Copy link

Every now and then when the server is shutting down or starting up (I forget if it's both or just one or the other), the shutdown/startup process is halted. I check the logs and I can see that this halting occurs when the Minepacks plugin is being enabled/disabled. Specifcally the halting occurs on the update checker part of the process. I'm assuming the plugin sometimes is not able to contact a site and as a result, the plugin disabling/enabling process can't continue, which then halts the startup/shutdown process. Usually plugin devs move their network stuff off the main thread because if it's on the main thread and a connection can't be reached, it just causes chaos. Update checker does not need to be on the main thread.

@ZepsiZola ZepsiZola added the bug label Mar 28, 2024
@GeorgH93
Copy link
Owner

GeorgH93 commented May 12, 2024

The update check isn't on the main thread.
However, on shutdown it will wait for it to finish, preventing broken updates in case someone kills the server early.
I guess I could add a config option to not check for updates on shutdown. Also, maybe reduce the timeouts for the checks.

@GeorgH93 GeorgH93 added enhancement and removed bug labels May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants