mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 09:08:26 +01:00
Merge pull request #136 from ywk253100/master
set timeout for creation of connection between UI and DB
This commit is contained in:
commit
9ca056d243
@ -77,7 +77,7 @@ func InitDB() {
|
||||
var err error
|
||||
var c net.Conn
|
||||
for {
|
||||
c, err = net.Dial("tcp", addr+":"+port)
|
||||
c, err = net.DialTimeout("tcp", addr+":"+port, 20*time.Second)
|
||||
if err == nil {
|
||||
c.Close()
|
||||
ch <- 1
|
||||
|
Loading…
Reference in New Issue
Block a user