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) { func (zone *ZoneDb) MatchLocal(name string) (net.IP, error) {
zone.mx.Lock() zone.mx.RLock()
defer zone.mx.Unlock() defer zone.mx.RUnlock()
return zone.match(name) return zone.match(name)
} }