code: func detectStaleConnections(oldEndpointsMap, newEndpointsMap EndpointsMap, staleEndpoints *[]ServiceEndpoint, staleServiceNames *[]ServicePortName) {
  	for svcPortName, epList := range oldEndpointsMap {
  		for _, ep := range epList {
  			stale := true
  			for i := range newEndpointsMap[svcPortName] {
  				if newEndpointsMap[svcPortName][i].Equal(ep) {
  					stale = false
  					break
  				}
  			}
  			if stale {
  				klog.V(4).Infof("Stale endpoint %v -> %v", svcPortName, ep.String())
  				*staleEndpoints = append(*staleEndpoints, ServiceEndpoint{Endpoint: ep.String(), ServicePortName: svcPortName})
  			}
  		}
  	}
  
  	for svcPortName, epList := range newEndpointsMap {
  		// For udp service, if its backend changes from 0 to non-0. There may exist a conntrack entry that could blackhole traffic to the service.
  		if len(epList) > 0 && len(oldEndpointsMap[svcPortName]) == 0 {
  			*staleServiceNames = append(*staleServiceNames, svcPortName)
  		}
  	}
  }
docs: // detectStaleConnections modifies <staleEndpoints> and <staleServices> with detected stale connections. <staleServiceNames>
  // is used to store stale udp service in order to clear udp conntrack later.