Browse Source

[core] feat: more info at handlePipelineException (#2796)

* feat: more info at handlePipelineException

* fix: info style for reviewed
cssxsh 1 year ago
parent
commit
d62c613b5f

+ 1 - 1
mirai-core/src/jvmBaseMain/kotlin/network/impl/netty/NettyNetworkHandler.kt

@@ -43,7 +43,7 @@ internal open class NettyNetworkHandler(
     ///////////////////////////////////////////////////////////////////////////
 
     protected open fun handlePipelineException(ctx: ChannelHandlerContext, error: Throwable) {
-        setState { StateClosed(NettyChannelException(cause = error)) }
+        setState { StateClosed(NettyChannelException(cause = error, message = "An unexpected exception was received from netty pipeline. (context=$context, address=$address)")) }
     }
 
     ///////////////////////////////////////////////////////////////////////////