Commit c956cf2 1 parent e5a9a0b commit c956cf2 Copy full SHA for c956cf2
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 @@ -526,8 +526,13 @@ func (s *WindowsService) initializeLDAP() error {
526
526
s .ldapInitialized = false
527
527
528
528
// failures due to timeouts might be transient, so retry more frequently
529
+ //
530
+ // TODO(zmb3): errors.Is does not work properly on ldap.Error
531
+ // (remove the extra errors.As() check when https://github.com/go-ldap/ldap/pull/461 merges)
529
532
retryAfter := windowsDesktopServiceCertRetryInterval
530
- if errors .Is (err , context .DeadlineExceeded ) {
533
+ var ldapErr * ldap.Error
534
+ if errors .Is (err , context .DeadlineExceeded ) ||
535
+ (errors .As (err , & ldapErr ) && errors .Is (ldapErr .Err , context .DeadlineExceeded )) {
531
536
retryAfter = ldapTimeoutRetryInterval
532
537
}
533
538
You can’t perform that action at this time.
0 commit comments