Fix(dns): use closure client (#251)
This commit is contained in:
parent
8ded4918b2
commit
72beaf1327
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue