Skip to content

Commit 124e61e

Browse files
committed
Fix an issue with the async event handler
1 parent 6d531b8 commit 124e61e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

seleniumbase/undetected/cdp_driver/connection.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,12 +639,14 @@ async def listener_loop(self):
639639
or inspect.iscoroutine(callback)
640640
):
641641
try:
642-
asyncio.create_task(callback(event, self))
642+
asyncio.create_task(
643+
callback(event, self.connection)
644+
)
643645
except TypeError:
644646
asyncio.create_task(callback(event))
645647
else:
646648
try:
647-
callback(event, self)
649+
callback(event, self.connection)
648650
except TypeError:
649651
callback(event)
650652
except Exception as e:

0 commit comments

Comments
 (0)