diff --git a/pynecone/app.py b/pynecone/app.py index 26b3dcb09..c01ceefa1 100644 --- a/pynecone/app.py +++ b/pynecone/app.py @@ -662,7 +662,9 @@ class EventNamespace(AsyncNamespace): # Process the events. async for update in process(self.app, event, sid, headers, client_ip): # Emit the event. - await self.emit(str(constants.SocketEvent.EVENT), update.json(), to=sid) # type: ignore + await asyncio.create_task( + self.emit(str(constants.SocketEvent.EVENT), update.json(), to=sid) + ) async def on_ping(self, sid): """Event for testing the API endpoint.