From 4dcc1812c6b633e7da16aaa21ad8eae7bdf19d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Thu, 6 Mar 2025 14:06:55 +0800 Subject: [PATCH] Fix UDP DNS server crash --- dns/transport/udp.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/dns/transport/udp.go b/dns/transport/udp.go index 5099c6f6..289b1fe2 100644 --- a/dns/transport/udp.go +++ b/dns/transport/udp.go @@ -110,13 +110,6 @@ func (t *UDPTransport) exchange(ctx context.Context, message *mDNS.Msg) (*mDNS.M conn.access.Lock() delete(conn.callbacks, messageId) conn.access.Unlock() - callback.access.Lock() - select { - case <-callback.done: - default: - close(callback.done) - } - callback.access.Unlock() }() rawMessage, err := exMessage.PackBuffer(buffer.FreeBytes()) if err != nil {