We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 373383a commit 080419eCopy full SHA for 080419e
realtime/connection.py
@@ -79,7 +79,7 @@ async def _run_callback_safe(self, callback: Callback, payload: Dict) -> None:
79
if asyncio.iscoroutinefunction(callback):
80
asyncio.create_task(callback(payload))
81
else:
82
- callback(payload)
+ asyncio.create_task(asyncio.to_thread(callback, payload))
83
except Exception as e:
84
raise CallbackError("Error in callback") from e
85
0 commit comments