mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-27 12:52:27 +02:00
all: retry the request more agressively
For better recovery and dealing with network stack changes, this commit change the request flow to: failure of any kind -> recreate transport/re-bootstrap -> retry once That would make ctrld recover from all scenarios in theory.
This commit is contained in:
committed by
Cuong Manh Le
parent
262dcb1dff
commit
fb20d443c1
@@ -93,8 +93,5 @@ func (r *legacyResolver) Resolve(ctx context.Context, msg *dns.Msg) (*dns.Msg, e
|
||||
Dialer: dialer,
|
||||
}
|
||||
answer, _, err := dnsClient.ExchangeContext(ctx, msg, r.endpoint)
|
||||
if _, ok := err.(*net.OpError); ok {
|
||||
return answer, ErrUpstreamFailed
|
||||
}
|
||||
return answer, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user