mirror of
https://github.com/wahyd4/kt-connect.git
synced 2026-08-09 05:16:02 +10:00
fix err is shadowed during return
This commit is contained in:
@@ -137,8 +137,9 @@ func (s *server) exchange(domain string, qtype uint16, name string) (rr []dns.RR
|
||||
|
||||
for _, item := range res.Answer {
|
||||
log.Info().Msgf("response: %s", item.String())
|
||||
r, err := s.getAnswer(name, domain, item)
|
||||
if err != nil {
|
||||
r, errInLoop := s.getAnswer(name, domain, item)
|
||||
if errInLoop != nil {
|
||||
err = errInLoop
|
||||
return
|
||||
}
|
||||
rr = append(rr, r)
|
||||
|
||||
Reference in New Issue
Block a user