From f0254c86551a4dd396f0dded84c675772ce7726a Mon Sep 17 00:00:00 2001 From: guzeng Date: Wed, 10 Mar 2021 15:41:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9E=E6=8E=A5=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sqlserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlserver.go b/sqlserver.go index 9c5be06..cb03e3a 100644 --- a/sqlserver.go +++ b/sqlserver.go @@ -21,7 +21,6 @@ func MSConnect(DBHOST, DBUSER, DBPWD, DBNAME, DBPORT string, conns ...int) error if DBHOST != "" && DBUSER != "" && DBPWD != "" && DBPORT != "" { //&& DBNAME != "" for i := 0; i < 10; i++ { - time.Sleep(time.Second * 5) //连接字符串 @@ -35,6 +34,7 @@ func MSConnect(DBHOST, DBUSER, DBPWD, DBNAME, DBPORT string, conns ...int) error if dbConnErr != nil { log.Println("ERROR", "can not connect to Database, ", dbConnErr) + time.Sleep(time.Second * 5) } else { log.Println("msdb connected")