Commit cc195eb 1 parent 818a8e8 commit cc195eb Copy full SHA for cc195eb
File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -531,8 +531,13 @@ func (s *WindowsService) initializeLDAP() error {
531
531
s .ldapInitialized = false
532
532
533
533
// failures due to timeouts might be transient, so retry more frequently
534
+ //
535
+ // TODO(zmb3): errors.Is does not work properly on ldap.Error
536
+ // (remove the extra errors.As() check when https://github.com/go-ldap/ldap/pull/461 merges)
534
537
retryAfter := windowsDesktopServiceCertRetryInterval
535
- if errors .Is (err , context .DeadlineExceeded ) {
538
+ var ldapErr * ldap.Error
539
+ if errors .Is (err , context .DeadlineExceeded ) ||
540
+ (errors .As (err , & ldapErr ) && errors .Is (ldapErr .Err , context .DeadlineExceeded )) {
536
541
retryAfter = ldapTimeoutRetryInterval
537
542
}
538
543
You can’t perform that action at this time.
0 commit comments