quickfixj icon indicating copy to clipboard operation
quickfixj copied to clipboard

Graceful disconnect functionality

Open philipwhiuk opened this issue 5 years ago • 1 comments
trafficstars

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

philipwhiuk avatar Jun 09 '20 15:06 philipwhiuk

Also see #244 / #312

chrjohn avatar Oct 19 '20 11:10 chrjohn