From 91821fa6ad14a7bd85832c0b0f9c74cb4bdd96a0 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 13 Apr 2021 00:29:30 -1000 Subject: [PATCH] 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. --- homeassistant/components/dhcp/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/dhcp/__init__.py b/homeassistant/components/dhcp/__init__.py index e21b6cf88dc..5d0b31c8788 100644 --- a/homeassistant/components/dhcp/__init__.py +++ b/homeassistant/components/dhcp/__init__.py @@ -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."""