diff --git a/changelog/unreleased/dont-connect-ldap-on-startup.md b/changelog/unreleased/dont-connect-ldap-on-startup.md new file mode 100644 index 0000000000..52dcefa7fa --- /dev/null +++ b/changelog/unreleased/dont-connect-ldap-on-startup.md @@ -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 diff --git a/services/graph/pkg/identity/ldap/reconnect.go b/services/graph/pkg/identity/ldap/reconnect.go index 0a4e924743..31525eea1e 100644 --- a/services/graph/pkg/identity/ldap/reconnect.go +++ b/services/graph/pkg/identity/ldap/reconnect.go @@ -205,10 +205,10 @@ func (c ConnWithReconnect) GetConnection() (*ldap.Conn, error) { } func (c ConnWithReconnect) ldapAutoConnect(config Config) { - l, err := c.ldapConnect(config) - if err != nil { - c.logger.Error().Err(err).Msg("autoconnect could not get ldap Connection") - } + var ( + l *ldap.Conn + err error + ) for { select {