From 7f40a67c2801bc7d874b529ccb30d5f753a659e4 Mon Sep 17 00:00:00 2001 From: Kairlec Date: Mon, 6 Jan 2025 10:25:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dssh=5Fconfig=E4=B8=ADH?= =?UTF-8?q?ost=E5=AD=98=E5=9C=A8=E5=85=B6=E4=BB=96=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E6=97=B6=E7=AC=AC=E4=B8=80=E6=AC=A1=E8=BF=9E=E6=8E=A5=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/app/termora/SshClients.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/kotlin/app/termora/SshClients.kt b/src/main/kotlin/app/termora/SshClients.kt index 01715e2..1b6d0e7 100644 --- a/src/main/kotlin/app/termora/SshClients.kt +++ b/src/main/kotlin/app/termora/SshClients.kt @@ -20,6 +20,7 @@ import java.net.InetSocketAddress import java.net.Proxy import java.time.Duration import kotlin.math.max +import org.apache.sshd.client.config.hosts.HostConfigEntryResolver object SshClients { private val timeout = Duration.ofSeconds(30) @@ -83,6 +84,8 @@ object SshClients { builder.forwardingFilter(AcceptAllForwardingFilter.INSTANCE) } + builder.hostConfigEntryResolver(HostConfigEntryResolver.EMPTY) + val sshClient = builder.build() as JGitSshClient val heartbeatInterval = max(host.options.heartbeatInterval, 3) CoreModuleProperties.HEARTBEAT_INTERVAL.set(sshClient, Duration.ofSeconds(heartbeatInterval.toLong()))