dont connect ldap on startup

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
jkoberg
2023-06-21 11:53:52 +02:00
parent 70b64d817e
commit eb9d2bc373
2 changed files with 9 additions and 4 deletions
@@ -0,0 +1,5 @@
Bugfix: Don't connect to ldap on startup
This leads to misleading error messages. Instead we connect on first request
https://github.com/owncloud/ocis/pull/6565
@@ -205,10 +205,10 @@ func (c ConnWithReconnect) GetConnection() (*ldap.Conn, error) {
} }
func (c ConnWithReconnect) ldapAutoConnect(config Config) { func (c ConnWithReconnect) ldapAutoConnect(config Config) {
l, err := c.ldapConnect(config) var (
if err != nil { l *ldap.Conn
c.logger.Error().Err(err).Msg("autoconnect could not get ldap Connection") err error
} )
for { for {
select { select {