remove mutex here

This commit is contained in:
Miek Gieben 2013-10-15 20:44:55 +01:00
parent 2bc1cd1a2e
commit 104d9bf0ba
1 changed files with 2 additions and 2 deletions

View File

@ -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