mirror of
https://github.com/home-assistant/core.git
synced 2026-10-06 10:37:31 +01: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:
1 parent
15f726da50
commit
1fef4fa1f6
1 file changed
+1
-2
@@ -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