From 0939f69398105461b36624df287e1b16263d11c5 Mon Sep 17 00:00:00 2001 From: injoyai <1113655791@qq.com> Date: Thu, 31 Oct 2024 08:35:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96,=E6=9C=8D=E5=8A=A1=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E5=8F=AF=E4=B8=8D=E5=A1=AB=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client.go b/client.go index d61dd5f..aab2e00 100644 --- a/client.go +++ b/client.go @@ -12,6 +12,7 @@ import ( "github.com/injoyai/logs" "github.com/injoyai/tdx/protocol" "runtime/debug" + "strings" "sync/atomic" "time" ) @@ -32,6 +33,9 @@ func WithRedial(b ...bool) client.Option { // Dial 与服务器建立连接 func Dial(addr string, op ...client.Option) (cli *Client, err error) { + if !strings.Contains(addr, ":") { + addr += ":7709" + } cli = &Client{ Wait: wait.New(time.Second * 2),