mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-10 02:27:01 +08:00
Avoid resource leak
This commit is contained in:
parent
d1fdddf9e6
commit
509be910c0
@ -88,8 +88,8 @@ internal abstract class AbstractKeepAliveNetworkHandlerSelector<H : NetworkHandl
|
||||
try {
|
||||
resumeConnection() // once finished, it should has been LOADING or OK
|
||||
} catch (e: LoginFailedException) {
|
||||
close(e)
|
||||
if (e is RetryLaterException) {
|
||||
close(e)
|
||||
return
|
||||
}
|
||||
// LoginFailedException is not resumable
|
||||
@ -171,4 +171,4 @@ internal inline fun <H : NetworkHandler> KeepAliveNetworkHandlerSelector(crossin
|
||||
return object : AbstractKeepAliveNetworkHandlerSelector<H>() {
|
||||
override fun createInstance(): H = createInstance()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user