Skip to content

Commit 508030c

Browse files
Fixing typos and logging
1 parent 7b40359 commit 508030c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

client/internal/dns/upstream.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ func (u *upstreamResolverBase) watchPeersConnStatusChanges() {
9292

9393
u.probeAvailability()
9494
if u.disabled {
95-
return fmt.Errorf("probe faled")
95+
return fmt.Errorf("probe failed")
9696
}
9797
return nil
9898
}
9999

100100
continualProbe := func() {
101101
// probe continually for 30s when peer count >= 1
102102
if u.statusRecorder.GetConnectedPeersCount() == 0 {
103-
log.Debug("O peer connected, running one more DNS probe")
103+
log.Debug("O peers connected, running one more DNS probe")
104104
// cancel backoff operation
105105
if cancelBackOff != nil {
106106
cancelBackOff()
@@ -111,13 +111,13 @@ func (u *upstreamResolverBase) watchPeersConnStatusChanges() {
111111
}
112112

113113
if probeRunning.Load() {
114-
log.Info("restarting DNS probing")
114+
log.Info("restart DNS probing")
115115
cancelBackOff()
116116
cancelBackOff = nil
117117
}
118118
defer func() {
119119
u.mutex.Lock()
120-
log.Infof("DNS probing finished, servers %s disabled: %t", u.upstreamServers, u.disabled)
120+
log.Infof("DNS probe finished, servers %s disabled: %t", u.upstreamServers, u.disabled)
121121
u.mutex.Unlock()
122122
probeRunning.Store(false)
123123
}()
@@ -128,7 +128,6 @@ func (u *upstreamResolverBase) watchPeersConnStatusChanges() {
128128
err := backoff.Retry(func() error {
129129
select {
130130
case <-ctx.Done():
131-
log.Warn("DNS probing cancelled")
132131
return backoff.Permanent(ctx.Err())
133132
default:
134133
return operation()
@@ -317,7 +316,8 @@ func (u *upstreamResolverBase) waitUntilResponse() {
317316
err := backoff.Retry(func() error {
318317
u.probeAvailability()
319318
if u.disabled {
320-
return fmt.Errorf("failed to enable upsstream")
319+
log.Tracef("checking connectivity with upstreams %s failed. Retrying in %s", u.upstreamServers, exponentialBackOff.NextBackOff())
320+
return fmt.Errorf("upstream check call error")
321321
}
322322
return nil
323323
}, exponentialBackOff)

0 commit comments

Comments
 (0)