Name the dhcp watcher thread (#49144)

When getting py-spy reports, it is helpful to get thread names
to make it easier to track down issues.
This commit is contained in:
J. Nick Koston 2021-04-13 00:29:30 -10:00 committed by GitHub
parent 2cc9ae1af1
commit 91821fa6ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -312,6 +312,8 @@ class DHCPWatcher(WatcherBase):
)
self._sniffer.start()
if self._sniffer.thread:
self._sniffer.thread.name = self.__class__.__name__
def handle_dhcp_packet(self, packet):
"""Process a dhcp packet."""