diff --git a/server.go b/server.go index 7aa39168..46949ba8 100644 --- a/server.go +++ b/server.go @@ -218,9 +218,9 @@ func (mux *ServeMux) HandleRemove(pattern string) { if pattern == "" { panic("dns: invalid pattern " + pattern) } - mux.m.Lock() + // don't need a mutex here, because deleting is OK, even if the + // entry is note there. delete(mux.z, Fqdn(pattern)) - mux.m.Unlock() } // ServeDNS dispatches the request to the handler whose