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

Initiator session does not Reset Sequence Numbers on logon on Reconnect #625

Closed
adam-talos opened this issue Apr 17, 2024 · 1 comment · Fixed by #635
Closed

Initiator session does not Reset Sequence Numbers on logon on Reconnect #625

adam-talos opened this issue Apr 17, 2024 · 1 comment · Fixed by #635

Comments

@adam-talos
Copy link
Contributor

I'm seeing an issue where my initiator session is not resetting its sequence numbers before logon even though ResetOnLogon is set to true when the server has disconnected it.

Compare this code in QuickFIXGo:
https://github.com/quickfixgo/quickfix/blob/04786a16e4a72a9eb6d30bf26376c509508da6cd/session_state.go#L46C1-L56C3

with this code in QuickFIXJ
https://github.com/quickfix-j/quickfixj/blob/bb2b919b8d4f286311e05cc418dff53f9ed517e1/quickfixj-core/src/main/java/quickfix/Session.java#L2062C1-L2091C6

In QuickFIXJ, the initiator session is resetting its sequence numbers right before sending the logon message. In quickFIXGo, the store is being reset in prepMessageForSend
https://github.com/quickfixgo/quickfix/blob/04786a16e4a72a9eb6d30bf26376c509508da6cd/session.go#L311C1-L328C4
Here we're checking the logon message for the 141=Y and only resetting if it is Y, so we won't try to reset the sequence numbers if we get disconnected and log on again.

I'm not sure what if there is a standard for this behavior, but probably it should match the QuickFIX standard.

@adam-talos
Copy link
Contributor Author

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