Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Hoch committed Dec 19, 2023
1 parent 4819cc7 commit c1cce56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyvlx/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand All @@ -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."""
Expand Down

0 comments on commit c1cce56

Please sign in to comment.