Avoid resource leak

This commit is contained in:
Karlatemp
2021-06-22 18:14:29 +08:00
committed by GitHub
parent d1fdddf9e6
commit 509be910c0

View File

@@ -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()
}
}
}