()
| 42 | } |
| 43 | |
| 44 | func (m *Mapping) clearAddresses() { |
| 45 | m.mut.Lock() |
| 46 | change := len(m.extAddresses) > 0 |
| 47 | for id, addr := range m.extAddresses { |
| 48 | l.Debugf("Clearing mapping %s: ID: %s Address: %s", m, id, addr) |
| 49 | delete(m.extAddresses, id) |
| 50 | } |
| 51 | m.expires = time.Time{} |
| 52 | m.mut.Unlock() |
| 53 | if change { |
| 54 | m.notify() |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | func (m *Mapping) notify() { |
| 59 | m.mut.RLock() |
no test coverage detected