mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
fix: catch context.DeadlineExceeded too
This commit is contained in:
parent
02830e0ad6
commit
18d62c4a17
|
@ -140,7 +140,7 @@ func (doh *dnsOverHTTPS) ExchangeContext(ctx context.Context, m *D.Msg) (msg *D.
|
|||
msg, err = doh.exchangeHTTPS(ctx, client, m)
|
||||
}
|
||||
|
||||
if err != nil && !errors.Is(err, context.Canceled) {
|
||||
if err != nil && !errors.Is(err, context.Canceled) && !errors.Is(err, context.DeadlineExceeded) {
|
||||
// If the request failed anyway, make sure we don't use this client.
|
||||
_, resErr := doh.resetClient(ctx, err)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user