From 885bccb2d2b62b97c5d32d480979e9f23530651a Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Mon, 2 Dec 2024 12:29:37 +0700 Subject: [PATCH] Reorder messages --- src/main/kotlin/ru/dbotthepony/kstarbound/network/Connection.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/network/Connection.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/network/Connection.kt index 06f9b8a8..5f28cf7a 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/network/Connection.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/network/Connection.kt @@ -121,8 +121,8 @@ abstract class Connection(val side: ConnectionSide, val type: ConnectionType) : open fun bind(channel: Channel) { scope = CoroutineScope(channel.eventLoop().asCoroutineDispatcher() + SupervisorJob() + CoroutineExceptionHandler { coroutineContext, throwable -> - disconnect("Uncaught exception in one of connection' coroutines: $throwable") LOGGER.fatal("Uncaught exception in one of $this coroutines", throwable) + disconnect("Uncaught exception in one of connection' coroutines: $throwable") }) channel.config().setOption(ChannelOption.TCP_NODELAY, true)