code: func (s *Service) updateMapping(mapping *Mapping, nats map[string]Device, renew bool) {
  	var added, removed []Address
  
  	renewalTime := time.Duration(s.cfg.Options().NATRenewalM) * time.Minute
  	mapping.expires = time.Now().Add(renewalTime)
  
  	newAdded, newRemoved := s.verifyExistingMappings(mapping, nats, renew)
  	added = append(added, newAdded...)
  	removed = append(removed, newRemoved...)
  
  	newAdded, newRemoved = s.acquireNewMappings(mapping, nats)
  	added = append(added, newAdded...)
  	removed = append(removed, newRemoved...)
  
  	if len(added) > 0 || len(removed) > 0 {
  		mapping.notify(added, removed)
  	}
  }
docs: // updateMapping compares the addresses of the existing mapping versus the natds
  // discovered, and removes any addresses of natds that do not exist, or tries to
  // acquire mappings for natds which the mapping was unaware of before.
  // Optionally takes renew flag which indicates whether or not we should renew
  // mappings with existing natds