initiator reconnect loop when state is lost
full disclosure: I'm fairly new to FIX
I've been messing around with quickfix and the session lifecycle and was interested to see how quickfix would handle the initiator loosing it's state entirely and starting with a clean state.
what seems to happen is that if MsgSeqNum
on the Logon
of the initiator doesn't match the TargetMsgSeqNum
of the acceptor, the acceptor will disconnect instantly.
then the initiator will reconnect after 30s and will send Login with a +1 MsgSeqNum
.
and this repeats, until eventually (depending on the msg history) the initiator has reached the proper MsgSeqNum
and then the acceptor will actually accept the connection, the initiator sends a ResendRequest
and we're good to go!
I think the right course of action would be for the initiator to send a reset?
but I can't seem to figure out how to detect this scenario and trigger that, or maybe the check in shouldSendReset
should be an OR instead of AND?