From 789f5c5bd2704fbc2a07464def57155b118400ca Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 11 Sep 2024 00:45:41 +0330 Subject: [PATCH] fix closing udp conn on query ctx cancel --- transport_udp.go | 1 - 1 file changed, 1 deletion(-) diff --git a/transport_udp.go b/transport_udp.go index 3903de1..bf9a48e 100644 --- a/transport_udp.go +++ b/transport_udp.go @@ -159,7 +159,6 @@ func (t *UDPTransport) exchange(ctx context.Context, message *dns.Msg) (*dns.Msg case <-conn.ctx.Done(): return nil, E.Errors(conn.err, conn.ctx.Err()) case <-ctx.Done(): - conn.Close() return nil, ctx.Err() } }