dont connect ldap on startup

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
jkoberg
2023-06-20 15:51:33 +02:00
parent 70b64d817e
commit eb9d2bc373
2 changed files with 9 additions and 4 deletions

View File

@@ -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

View File

@@ -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 {