Fix false negative assertions

This commit is contained in:
DBotThePony 2023-08-04 15:45:47 +07:00
parent e83933077e
commit 7662c21f44
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -165,7 +165,7 @@ abstract class MatteryNetworkChannel(val version: String, val name: String) {
internal fun onServerStarting() {
interrupt = false
check(thread == null) { "Already having network dispatcher thread, ServerStartingEvent was fired twice!" }
check(thread?.isAlive != true) { "Already having network dispatcher thread, ServerStartingEvent was fired twice!" }
thread = Thread(this::run, "Overdrive That Matters Network Dispatcher").also { it.isDaemon = true; it.start() }
}