You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from the code in server.py I found that websockets are a way to receive push notifications. I very much like this idea! After playing around with it a little, I could only receive the very first message after I connected to the /ws endpoint. 1 message on the "settings" topic. Right after this message, the connection got closed.
After debugging aca-py a bit, I can locate the issue now.
I used version 0.4.1, but no change in server.py since then.
Hi all,
from the code in
server.py
I found that websockets are a way to receive push notifications. I very much like this idea! After playing around with it a little, I could only receive the very first message after I connected to the/ws
endpoint. 1 message on the "settings" topic. Right after this message, the connection got closed.After debugging
aca-py
a bit, I can locate the issue now.I used version 0.4.1, but no change in server.py since then.
send = loop.create_task(queue.dequeue(timeout=5.0))
https://github.com/hyperledger/aries-cloudagent-python/blob/master/aries_cloudagent/admin/server.py#L364
The timeout can cause an
asyncio.TimeoutError
exception.(raised in
basic.py
)If that happens, it's not detected until this call:
msg = send.result()
https://github.com/hyperledger/aries-cloudagent-python/blob/master/aries_cloudagent/admin/server.py#L380
This call re-raises the exception from inside the task and causes the whole loop to stop and jump to the
finally
block and cleans up the websocket queue.Websocket closed now and it can't be used in
send_webhook
any more.https://github.com/hyperledger/aries-cloudagent-python/blob/master/aries_cloudagent/admin/server.py#L427
I see a few options:
asyncio.TimeoutError
near thesend.result()
call (or somewhere later, still inside the loop) orsend.exception()
before theresult()
callAny thoughts on this?
Thanks and have a nice evening,
Matthias
The text was updated successfully, but these errors were encountered: