From 833c9d2c979e5fb41af5a2d3cf7e1bdda48d500e Mon Sep 17 00:00:00 2001 From: Him188 Date: Thu, 17 Jun 2021 21:51:08 +0800 Subject: [PATCH] Do not turn state into Connecting in `handlePipelineException` --- .../kotlin/network/impl/netty/NettyNetworkHandler.kt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/mirai-core/src/commonMain/kotlin/network/impl/netty/NettyNetworkHandler.kt b/mirai-core/src/commonMain/kotlin/network/impl/netty/NettyNetworkHandler.kt index 8cc9bb69a..0bfaf5e0c 100644 --- a/mirai-core/src/commonMain/kotlin/network/impl/netty/NettyNetworkHandler.kt +++ b/mirai-core/src/commonMain/kotlin/network/impl/netty/NettyNetworkHandler.kt @@ -69,15 +69,7 @@ internal open class NettyNetworkHandler( } protected open fun handlePipelineException(ctx: ChannelHandlerContext, error: Throwable) { -// context.bot.logger.error(error) - synchronized(this) { - setState { StateClosed(NettyChannelException(cause = error)) } - if (_state !is StateConnecting) { - setState { StateConnecting(ExceptionCollector(error)) } - } else { - close(error) - } - } + setState { StateClosed(NettyChannelException(cause = error)) } } ///////////////////////////////////////////////////////////////////////////