Fixed issues when shutting down before starting up
This commit is contained in:
parent
6c4cb55a2e
commit
43c4b6c742
@ -227,10 +227,14 @@ internal class EventPoller {
|
||||
}
|
||||
|
||||
private suspend fun doClose() {
|
||||
val wasRunning = running
|
||||
|
||||
running = false
|
||||
shutdownLatch.await()
|
||||
configured = false
|
||||
|
||||
dispatchScope.cancel("Closed event dispatch")
|
||||
if (wasRunning) {
|
||||
dispatchScope.cancel("Closed event dispatch")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user