From c1cce5605486230eb885f7363aeb8c5129808696 Mon Sep 17 00:00:00 2001 From: Christopher Hoch Date: Tue, 19 Dec 2023 12:02:30 +0100 Subject: [PATCH] bugfix --- pyvlx/connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyvlx/connection.py b/pyvlx/connection.py index 1c3de6e8..743edb7a 100644 --- a/pyvlx/connection.py +++ b/pyvlx/connection.py @@ -132,7 +132,7 @@ def register_connection_closed_cb(self, callback: Callable[[], Coroutine]) -> No """Register frame received callback.""" self.connection_closed_cbs.append(callback) if not self.connected: - self.loop.create_task(callback) + self.loop.create_task(callback()) def unregister_connection_closed_cb(self, callback: Callable[[], Coroutine]) -> None: """Unregister frame received callback.""" @@ -142,7 +142,7 @@ def register_connection_opened_cb(self, callback: Callable[[], Coroutine]) -> No """Register frame received callback.""" self.connection_opened_cbs.append(callback) if self.connected: - self.loop.create_task(callback) + self.loop.create_task(callback()) def unregister_connection_opened_cb(self, callback: Callable[[], Coroutine]) -> None: """Unregister frame received callback."""