Name the dhcp watcher thread ()

When getting py-spy reports, it is helpful to get thread names
to make it easier to track down issues.
pull/49166/head
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
1 changed files with 2 additions and 0 deletions
homeassistant/components/dhcp

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."""