Commit b3b1127 1 parent 460c432 commit b3b1127 Copy full SHA for b3b1127
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 @@ -503,8 +503,13 @@ func (s *WindowsService) initializeLDAP() error {
503
503
s .ldapInitialized = false
504
504
505
505
// failures due to timeouts might be transient, so retry more frequently
506
+ //
507
+ // TODO(zmb3): errors.Is does not work properly on ldap.Error
508
+ // (remove the extra errors.As() check when https://github.com/go-ldap/ldap/pull/461 merges)
506
509
retryAfter := windowsDesktopServiceCertRetryInterval
507
- if errors .Is (err , context .DeadlineExceeded ) {
510
+ var ldapErr * ldap.Error
511
+ if errors .Is (err , context .DeadlineExceeded ) ||
512
+ (errors .As (err , & ldapErr ) && errors .Is (ldapErr .Err , context .DeadlineExceeded )) {
508
513
retryAfter = ldapTimeoutRetryInterval
509
514
}
510
515
You can’t perform that action at this time.
0 commit comments