Browse Source

关闭sqlserver连接修改

master v0.5.2
guzeng 3 years ago
parent
commit
abb2bbf3b5
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      sqlserver.go

+ 4
- 1
sqlserver.go View File

@ -58,5 +58,8 @@ func MSConnect(DBHOST, DBUSER, DBPWD, DBNAME, DBPORT string, conns ...int) error
} }
func CloseMSConn() error { func CloseMSConn() error {
return MSDB_CONN.Close()
if MSDB_CONN != nil {
return MSDB_CONN.Close()
}
return nil
} }

Loading…
Cancel
Save