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

Connection closed when inbound logon has a too-low sequence number #369

Closed
imirkin opened this issue Mar 13, 2019 · 1 comment · Fixed by #392
Closed

Connection closed when inbound logon has a too-low sequence number #369

imirkin opened this issue Mar 13, 2019 · 1 comment · Fixed by #392

Comments

@imirkin
Copy link

imirkin commented Mar 13, 2019

This seems like a pretty common case ... someone loses their session, doesn't realize it, and is wondering why they don't get a response to a Logon / connection gets closed. Internally there's a log about the sequence number being too low, but it would be nice to provide that feedback to the other side.

Is there a strong reason why this isn't handled in logon_state.go? Would it be OK to return a rejection of some sort with the information that's logged? (Suggestions on how to best do that, or a different approach are most welcome.)

@imirkin
Copy link
Author

imirkin commented Apr 17, 2019

So looking at the C++ QuickFix (github.com/quickfix/quickfix), I see the following:

https://github.com/quickfix/quickfix/blob/master/src/C%2B%2B/Session.cpp#L202 (Session::nextLogon)

This calls verify(logon, false, true), i.e. checkTooHigh = false, checkTooLow = true. In doTargetTooLow, it will call generateLogout() with the error about the MsgSeqNum being too low, which in turn will just send a Logout (5) message.

I suspect that returning logoutState{} in the targetTooLow case should be enough to generate this.

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

Successfully merging a pull request may close this issue.

1 participant