Fix false negative assertions
This commit is contained in:
parent
e83933077e
commit
7662c21f44
@ -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() }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user