Changed Lock to RLock when matching

This commit is contained in:
Michael Bridgen committed 2014-10-21 14:01:07 +01:00
1 parent 6eb7d71499
commit 23edd79177
1 file changed
+2 -2
+2 -2
View File
@@ -72,8 +72,8 @@ func (zone *ZoneDb) indexOfIdentAddr(ident string, addr net.IP) int {
}
func (zone *ZoneDb) MatchLocal(name string) (net.IP, error) {
zone.mx.Lock()
defer zone.mx.Unlock()
zone.mx.RLock()
defer zone.mx.RUnlock()
return zone.match(name)
}