Minepacks icon indicating copy to clipboard operation
Minepacks copied to clipboard

Take the update checker off the main thread please

Open ZepsiZola opened this issue 1 year ago • 1 comments

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 avatar Mar 28 '24 21:03 ZepsiZola

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 avatar May 12 '24 19:05 GeorgH93