mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-23 22:30:47 +08:00
Do not turn state into Connecting in handlePipelineException
This commit is contained in:
parent
faed38da9e
commit
833c9d2c97
@ -69,15 +69,7 @@ internal open class NettyNetworkHandler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected open fun handlePipelineException(ctx: ChannelHandlerContext, error: Throwable) {
|
protected open fun handlePipelineException(ctx: ChannelHandlerContext, error: Throwable) {
|
||||||
// context.bot.logger.error(error)
|
|
||||||
synchronized(this) {
|
|
||||||
setState { StateClosed(NettyChannelException(cause = error)) }
|
setState { StateClosed(NettyChannelException(cause = error)) }
|
||||||
if (_state !is StateConnecting) {
|
|
||||||
setState { StateConnecting(ExceptionCollector(error)) }
|
|
||||||
} else {
|
|
||||||
close(error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user