Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocket OutboundTransport can be closed #4

Open
kukgini opened this issue Dec 14, 2022 · 0 comments
Open

WebSocket OutboundTransport can be closed #4

kukgini opened this issue Dec 14, 2022 · 0 comments

Comments

@kukgini
Copy link
Contributor

kukgini commented Dec 14, 2022

When a Invitation which has websocket endpoint is received, the existing socket already connected to the mediator can be disappeared in WsOutboundTransport.

@conanac says: For now, we keep only one WebSocket session, so the previous session, in this case, the session for the ACA-Py mediator, can be closed. That session will be recovered soon because we periodically send a ping to the mediator. At this time, the ws session for the counterparty agent may be closed. But, it will not be a problem because the counterparty agent could still send messages via the mediator.

That said, it may be better if we keep a session for each WebSocket endpoint. We will need the following jobs:

  • Prepare a map of sockets
  • Do not send a ping periodically to the mediator, instead send a ping when the App enters foreground. This should be done by the App and we provide a function for the App to call.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant