mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 15:28:05 +03:00
Windows: start the service in a goroutine
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -264,7 +264,11 @@ func initializePGSQLProvider() error {
|
||||
dbHandle.SetConnMaxLifetime(240 * time.Second)
|
||||
dbHandle.SetConnMaxIdleTime(120 * time.Second)
|
||||
provider = &PGSQLProvider{dbHandle: dbHandle}
|
||||
return nil
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), defaultSQLQueryTimeout)
|
||||
defer cancel()
|
||||
|
||||
return dbHandle.PingContext(ctx)
|
||||
}
|
||||
|
||||
func getPGSQLHostsAndPorts(configHost string, configPort int) (string, string) {
|
||||
|
||||
Reference in New Issue
Block a user