def _interface_poll_loop(self):
"""Greenlet: Polls host endpoints for changes to their IP addresses.
Sends updates to the EndpointManager via the _on_iface_ips_update()
message.
If polling is disabled, then it reads the interfaces once and then
stops.
"""
known_interfaces = {}
while True:
known_interfaces = self._poll_interfaces(known_interfaces)
if self.config.HOST_IF_POLL_INTERVAL_SECS <= 0:
_log.info("Host interface polling disabled, stopping after "
"initial read. Further changes to host endpoint "
"IPs will be ignored.")
break
gevent.sleep(self.config.HOST_IF_POLL_INTERVAL_SECS)
评论列表
文章目录