From 213991f10a9c275b105c13d4a15f13507ca1d968 Mon Sep 17 00:00:00 2001 From: cssxsh Date: Thu, 20 Oct 2022 14:37:30 +0800 Subject: [PATCH] build: 1.5.8-M1 --- build.gradle.kts | 2 +- src/main/kotlin/xyz/cssxsh/mirai/weibo/WeiboHelperPlugin.kt | 2 +- src/main/kotlin/xyz/cssxsh/mirai/weibo/WeiboSubscriber.kt | 5 +++-- src/main/kotlin/xyz/cssxsh/mirai/weibo/WeiboUtils.kt | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 1d8610c..a428971 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } group = "xyz.cssxsh" -version = "1.5.8" +version = "1.5.9-M1" mavenCentralPublish { useCentralS01() diff --git a/src/main/kotlin/xyz/cssxsh/mirai/weibo/WeiboHelperPlugin.kt b/src/main/kotlin/xyz/cssxsh/mirai/weibo/WeiboHelperPlugin.kt index e325cb0..f1eb452 100644 --- a/src/main/kotlin/xyz/cssxsh/mirai/weibo/WeiboHelperPlugin.kt +++ b/src/main/kotlin/xyz/cssxsh/mirai/weibo/WeiboHelperPlugin.kt @@ -13,7 +13,7 @@ import net.mamoe.mirai.utils.* import xyz.cssxsh.mirai.weibo.data.* object WeiboHelperPlugin : KotlinPlugin( - JvmPluginDescription("xyz.cssxsh.mirai.plugin.weibo-helper", "1.5.8") { + JvmPluginDescription("xyz.cssxsh.mirai.plugin.weibo-helper", "1.5.9") { name("weibo-helper") author("cssxsh") } diff --git a/src/main/kotlin/xyz/cssxsh/mirai/weibo/WeiboSubscriber.kt b/src/main/kotlin/xyz/cssxsh/mirai/weibo/WeiboSubscriber.kt index 1917621..1e493c4 100644 --- a/src/main/kotlin/xyz/cssxsh/mirai/weibo/WeiboSubscriber.kt +++ b/src/main/kotlin/xyz/cssxsh/mirai/weibo/WeiboSubscriber.kt @@ -176,9 +176,10 @@ abstract class WeiboSubscriber>(val type: String) : CoroutineS } catch (exception: SerializationException) { logger.warning({ "$type(${id})监听任务序列化时失败" }, exception) sendLoginMessage("$type(${id})监听任务序列化时失败") - continue } catch (exception: UnknownHostException) { - // + logger.warning({ "$type(${id})监听任务, 网络异常" }, exception) + } catch (exception: SocketException) { + logger.warning({ "$type(${id})监听任务, 网络异常" }, exception) } catch (exception: Exception) { logger.warning({ "WEIBO登陆状态将刷新" }, exception) try { diff --git a/src/main/kotlin/xyz/cssxsh/mirai/weibo/WeiboUtils.kt b/src/main/kotlin/xyz/cssxsh/mirai/weibo/WeiboUtils.kt index 132724c..0374bb2 100644 --- a/src/main/kotlin/xyz/cssxsh/mirai/weibo/WeiboUtils.kt +++ b/src/main/kotlin/xyz/cssxsh/mirai/weibo/WeiboUtils.kt @@ -523,8 +523,8 @@ internal val ClientIgnore: suspend (Throwable) -> Boolean = { throwable -> is UnknownHostException, is NoRouteToHostException -> false is okhttp3.internal.http2.StreamResetException -> true - is IOException -> { - logger.warning { "WeiboClient Ignore $throwable" } + is SocketException -> { + logger.warning { "Weibo Client Ignore $throwable" } true } else -> false