Don't change to FAILED_TO_LOAD_CONFIG or FAILED_TO_START status on reload

This commit is contained in:
Vankka 2023-06-19 18:35:23 +03:00
parent 4e4b21ae7c
commit 6d744ccec4
No known key found for this signature in database
GPG Key ID: 6E50CB7A29B96AD0

View File

@ -633,7 +633,9 @@ public abstract class AbstractDiscordSRV<B extends IBootstrap, C extends MainCon
channelConfig().reload();
} catch (Throwable t) {
setStatus(Status.FAILED_TO_LOAD_CONFIG);
if (initial) {
setStatus(Status.FAILED_TO_LOAD_CONFIG);
}
throw t;
}
}
@ -726,7 +728,9 @@ public abstract class AbstractDiscordSRV<B extends IBootstrap, C extends MainCon
} catch (StorageException e) {
e.log(this);
logger().error("Failed to connect to storage");
setStatus(Status.FAILED_TO_START);
if (initial) {
setStatus(Status.FAILED_TO_START);
}
return Collections.singletonList(ReloadResults.STORAGE_CONNECTION_FAILED);
}
}