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

Graceful disconnect functionality #300

Open
philipwhiuk opened this issue Jun 9, 2020 · 1 comment
Open

Graceful disconnect functionality #300

philipwhiuk opened this issue Jun 9, 2020 · 1 comment

Comments

@philipwhiuk
Copy link
Contributor

philipwhiuk commented Jun 9, 2020

There's no straightforward way to tell a session "Logout and then disconnect"

If you call 'disconnect()' we just disconnect - we don't try to send a logout let alone wait for a response - we take a reason but we don't send it to the client. This is seen in #244 and #101

Ideally there would be a method similar to:

Future<LogoutResponse> logoutAndDisconnect(int waitForResponseTimeout) {}

which:

  • sent a logout
  • optionally waited for a response (if timeout > 0)
  • disconnected

This would be a high level call which abstracted away all the interaction waiting for the logout response. The future would provide a way of monitoring it if desired.

Alternatives/work-arounds:

  • User implementation of behaviour in app-code
  • Just calling disconnect and hoping the other side behaves reasonably
@chrjohn
Copy link
Member

chrjohn commented Oct 19, 2020

Also see #244 / #312

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants