From 66cba3112325e83e17254fd826b576662725d99d Mon Sep 17 00:00:00 2001 From: Kslr Date: Sun, 14 Apr 2019 08:57:01 +0800 Subject: [PATCH] return error instead of panic, fixes #1638 --- app/dns/udpns.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/dns/udpns.go b/app/dns/udpns.go index f5c4ea6ef..853c95d21 100644 --- a/app/dns/udpns.go +++ b/app/dns/udpns.go @@ -367,8 +367,8 @@ func (s *ClassicNameServer) sendQuery(ctx context.Context, domain string, option msgs := s.buildMsgs(domain, option) for _, msg := range msgs { - b, err := dns.PackMessage(msg) - common.Must(err) + b, _ := dns.PackMessage(msg) + udpCtx := context.Background() if inbound := session.InboundFromContext(ctx); inbound != nil { udpCtx = session.ContextWithInbound(udpCtx, inbound)