From 8eaff6b01445f65060301d0a2aea2de669e69887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20B=C3=B6hm?= Date: Sat, 19 Oct 2024 15:06:51 +0200 Subject: [PATCH] refactor: Replace deprecated get_event_loop with get_running_loop; #335 --- aiomqtt/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiomqtt/client.py b/aiomqtt/client.py index 8b70758..62a7cf1 100644 --- a/aiomqtt/client.py +++ b/aiomqtt/client.py @@ -244,7 +244,7 @@ def __init__( # noqa: C901, PLR0912, PLR0913, PLR0915 self._bind_port = bind_port self._clean_start = clean_start self._properties = properties - self._loop = asyncio.get_event_loop() + self._loop = asyncio.get_running_loop() # Connection state self._connected: asyncio.Future[None] = asyncio.Future()