From f6c225df65ea1f7c6cfeb1ee088f199e39e43ee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Tue, 24 Mar 2026 21:00:25 +0800 Subject: [PATCH] Fix command client connect crash --- .../main/java/io/nekohasekai/sfa/utils/CommandClient.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/nekohasekai/sfa/utils/CommandClient.kt b/app/src/main/java/io/nekohasekai/sfa/utils/CommandClient.kt index c5b7681..3d5abf9 100644 --- a/app/src/main/java/io/nekohasekai/sfa/utils/CommandClient.kt +++ b/app/src/main/java/io/nekohasekai/sfa/utils/CommandClient.kt @@ -100,7 +100,12 @@ open class CommandClient( } options.statusInterval = 1 * 1000 * 1000 * 1000 val commandClient = CommandClient(clientHandler, options) - commandClient.connect() + try { + commandClient.connect() + } catch (e: Exception) { + Log.d("CommandClient", "connect failed", e) + return + } this.commandClient = commandClient }