Fixed issues when shutting down before starting up

This commit is contained in:
Robinson 2023-06-26 00:37:33 +02:00
parent 6c4cb55a2e
commit 43c4b6c742
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C

View File

@ -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")
}
}
}