We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b58297e commit 1c9864eCopy full SHA for 1c9864e
src/main/kotlin/io/github/freya022/botcommands/internal/core/service/BCShutdownHook.kt
@@ -31,7 +31,11 @@ internal class BCShutdownHook internal constructor(
31
@BEventListener
32
internal fun onShuttingDown(event: BStatusChangeEvent) {
33
if (event.newStatus == BContext.Status.SHUTTING_DOWN) {
34
- Runtime.getRuntime().removeShutdownHook(hook)
+ try {
35
+ Runtime.getRuntime().removeShutdownHook(hook)
36
+ } catch (_: IllegalStateException) {
37
+ //
38
+ }
39
}
40
41
0 commit comments