mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
Fix(dns): use closure client (#251)
This commit is contained in:
parent
85128a634d
commit
528fbd10e4
|
@ -182,7 +182,8 @@ func (r *Resolver) batchExchange(clients []resolver, m *D.Msg) (msg *D.Msg, err
|
|||
defer cancel()
|
||||
fast, ctx := picker.WithContext(ctx)
|
||||
|
||||
for _, r := range clients {
|
||||
for _, client := range clients {
|
||||
r := client
|
||||
fast.Go(func() (interface{}, error) {
|
||||
msg, err := r.ExchangeContext(ctx, m)
|
||||
if err != nil || msg.Rcode != D.RcodeSuccess {
|
||||
|
|
Loading…
Reference in New Issue
Block a user