webdav: refactor server initialization

This commit is contained in:
Nicola Murino
2021-01-03 09:51:54 +01:00
parent 1e1c46ae1b
commit 4b522a2455
7 changed files with 67 additions and 62 deletions

View File

@@ -165,9 +165,9 @@ func (c Conf) Initialize(configDir string) error {
MinVersion: tls.VersionTLS12,
}
httpServer.TLSConfig = config
return utils.HTTPListenAndServe(httpServer, c.BindAddress, c.BindPort, true)
return utils.HTTPListenAndServe(httpServer, c.BindAddress, c.BindPort, true, logSender)
}
return utils.HTTPListenAndServe(httpServer, c.BindAddress, c.BindPort, false)
return utils.HTTPListenAndServe(httpServer, c.BindAddress, c.BindPort, false, logSender)
}
// ReloadTLSCertificate reloads the TLS certificate and key from the configured paths