From 7bbb5213f3cbfd5265f19718b484bb5e32be8fdf Mon Sep 17 00:00:00 2001 From: Alex Iribarren Date: Wed, 6 Oct 2021 00:44:48 +0200 Subject: [PATCH] Only ping once every two seconds (#2448) --- esphome/dashboard/dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/dashboard/dashboard.py b/esphome/dashboard/dashboard.py index 492b86384d..eb698a7de1 100644 --- a/esphome/dashboard/dashboard.py +++ b/esphome/dashboard/dashboard.py @@ -582,7 +582,7 @@ class MDNSStatusThread(threading.Thread): class PingStatusThread(threading.Thread): def run(self): with multiprocessing.Pool(processes=8) as pool: - while not STOP_EVENT.is_set(): + while not STOP_EVENT.wait(2): # Only do pings if somebody has the dashboard open def callback(ret):