fix: reduce reconnect time to around 7 seconds in startup

This commit is contained in:
Stavros
2026-06-28 18:29:42 +03:00
parent 6e7ead6a63
commit b93cd05c8b
+2 -2
View File
@@ -75,9 +75,9 @@ func NewLdapService(i LdapServiceInput) (*LdapService, error) {
_, err := ldap.connect()
// Warn: This will hang the tinyauth startup for a good 45 seconds until it fails
if err != nil {
err = ldap.reconnect(10 * time.Second)
// 3s + 4.5s (3x1.5) = ~6.75-8.25s total wait time before giving up
err = ldap.reconnect(3 * time.Second)
return nil, fmt.Errorf("failed to connect to ldap server: %w", err)
}