mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
Only ping once every two seconds (#2448)
This commit is contained in:
parent
b8b30599ee
commit
7bbb5213f3
1 changed files with 1 additions and 1 deletions
|
@ -582,7 +582,7 @@ class MDNSStatusThread(threading.Thread):
|
||||||
class PingStatusThread(threading.Thread):
|
class PingStatusThread(threading.Thread):
|
||||||
def run(self):
|
def run(self):
|
||||||
with multiprocessing.Pool(processes=8) as pool:
|
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
|
# Only do pings if somebody has the dashboard open
|
||||||
|
|
||||||
def callback(ret):
|
def callback(ret):
|
||||||
|
|
Loading…
Reference in a new issue