mirror of
https://github.com/GayPizzaSpecifications/foundation.git
synced 2025-08-02 13:10:55 +00:00
DevUpdateServer: Properly handle update in callback.
This commit is contained in:
parent
4284791804
commit
a7d7c9f818
@ -96,12 +96,13 @@ class DevUpdateServer(val plugin: FoundationCorePlugin) {
|
||||
|
||||
exchange.respond(200, "Success.")
|
||||
plugin.slF4JLogger.info("DevUpdate Started")
|
||||
UpdateService.updatePlugins(plugin.server.consoleSender)
|
||||
plugin.server.scheduler.runTask(plugin) { ->
|
||||
try {
|
||||
plugin.server.shutdown()
|
||||
} catch (e: Exception) {
|
||||
plugin.slF4JLogger.error("DevUpdate Server failed to update server.", e)
|
||||
UpdateService.updatePlugins(plugin.server.consoleSender) {
|
||||
plugin.server.scheduler.runTask(plugin) { ->
|
||||
try {
|
||||
plugin.server.shutdown()
|
||||
} catch (e: Exception) {
|
||||
plugin.slF4JLogger.error("DevUpdate Server failed to update server.", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user