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 b3133de commit ba842f2Copy full SHA for ba842f2
src/main/kotlin/io/github/freya022/botcommands/internal/core/BContextImpl.kt
@@ -179,7 +179,11 @@ internal class BContextImpl internal constructor(
179
}
180
181
override fun shutdownNow() {
182
- shutdown()
+ // Do not call shutdown(), more precisely do not call scheduleShutdownSignal() twice
183
+ if (status == Status.SHUTTING_DOWN || status == Status.SHUTDOWN) return
184
+ removeShutdownHook()
185
+
186
+ runBlocking { setStatus(Status.SHUTTING_DOWN) }
187
188
scheduleShutdownSignal(afterShutdownSignal = {
189
shutdownEventManagerScope(now = true)
0 commit comments