Skip to content

Commit

Permalink
Merge pull request finos#2806 from s22chan/master
Browse files Browse the repository at this point in the history
fix aiohttp disconnect error on websockets
  • Loading branch information
texodus authored Oct 29, 2024
2 parents fb11915 + e1c1a03 commit 09204c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rust/perspective-python/perspective/handlers/aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(self, **kwargs):
self._request = kwargs.pop("request")
super().__init__(**kwargs)

async def run(self) -> None:
async def run(self) -> web.WebSocketResponse:
def inner(msg):
asyncio.get_running_loop().create_task(self._ws.send_bytes(msg))

Expand All @@ -53,3 +53,4 @@ def inner(msg):

finally:
self.session.close()
return self._ws

0 comments on commit 09204c5

Please sign in to comment.