quickfixj
quickfixj copied to clipboard
Graceful disconnect functionality
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
disconnectand hoping the other side behaves reasonably
Also see #244 / #312