mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Prevent time.sleep calls from blocking the event loop (#118561)
* Prevent time.sleep calls from blocking the event loop We have been warning on these since Jan 2022. 2+ years seems more than enough time to give to fix these. see https://github.com/home-assistant/core/pull/63766 * Prevent time.sleep calls from blocking the event loop We have been warning on these since Jan 2022. 2+ years seems more than enough time to give to fix these. see https://github.com/home-assistant/core/pull/63766
This commit is contained in:
@ -52,10 +52,9 @@ def enable() -> None:
|
||||
HTTPConnection.putrequest, loop_thread_id=loop_thread_id
|
||||
)
|
||||
|
||||
# Prevent sleeping in event loop. Non-strict since 2022.02
|
||||
# Prevent sleeping in event loop.
|
||||
time.sleep = protect_loop(
|
||||
time.sleep,
|
||||
strict=False,
|
||||
check_allowed=_check_sleep_call_allowed,
|
||||
loop_thread_id=loop_thread_id,
|
||||
)
|
||||
|
Reference in New Issue
Block a user