try making sure the connection closes in the availability checker

This commit is contained in:
idk
2020-08-12 22:14:23 -04:00
parent f28536b381
commit 64390e2d8e

View File

@ -281,10 +281,10 @@ func Available() bool {
log.Println("Connecting error:", err) log.Println("Connecting error:", err)
} }
if conn != nil { if conn != nil {
defer conn.Close() conn.Close()
return true return true
} }
time.Sleep(time.Duration(i*3) * time.Second) time.Sleep(time.Duration(i*10) * time.Second)
} }
return false return false
} }