Skip to content

Commit

Permalink
Merge pull request #3134 from mitre/issue-3121
Browse files Browse the repository at this point in the history
fix handler signature to address websocket errors
  • Loading branch information
elegantmoose authored Feb 25, 2025
2 parents 140f1bc + dabc647 commit 83ac7e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/contacts/contact_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ def __init__(self, services):
self.handles = []
self.log = BaseWorld.create_logger('websocket_handler')

async def handle(self, socket, path):
async def handle(self, connection):
try:
path = connection.request.path
for handle in [h for h in self.handles if path.split('/', 1)[1].startswith(h.tag)]:
await handle.run(socket, path, self.services)
await handle.run(connection, path, self.services)
except Exception as e:
self.log.debug(e)
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ aiohttp-apispec==3.0.0b2
jinja2==3.1.3
pyyaml==6.0.1
cryptography==42.0.2
websockets==11.0.3
websockets==15.0
Sphinx==7.1.2
sphinx_rtd_theme==1.3.0
myst-parser==2.0.0
Expand Down

0 comments on commit 83ac7e9

Please sign in to comment.