mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
set timeout for creation of connection between UI and DB
This commit is contained in:
parent
ba69666509
commit
b5b22350d1
@ -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