mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-21 07:56:56 +08:00
#1509 try to fix bot is closed manually
This commit is contained in:
parent
93fad9ee1c
commit
6cd7fa9709
@ -132,8 +132,7 @@ internal open class QQAndroidBot constructor(
|
||||
cause is NetworkException && cause.recoverable -> {
|
||||
eventDispatcher.broadcastAsync(BotOfflineEvent.Dropped(bot, cause))
|
||||
}
|
||||
cause == null ->{
|
||||
eventDispatcher.broadcastAsync(BotOfflineEvent.Dropped(bot, null))
|
||||
cause is BotClosedByEvent -> {
|
||||
}
|
||||
else -> {
|
||||
// any other unexpected exceptions considered as an error
|
||||
|
@ -159,7 +159,7 @@ internal open class NettyNetworkHandler(
|
||||
|
||||
future.channel().closeFuture().addListener {
|
||||
if (_state.correspondingState == State.CLOSED) return@addListener
|
||||
close(it.cause())
|
||||
close(NettyChannelException(cause = it.cause()))
|
||||
}
|
||||
|
||||
return contextResult.await()
|
||||
|
Loading…
Reference in New Issue
Block a user