Details
Description
For Loogout messages the "Too High" check is not done on the sequence number. If a Logout message with a sequence number that is too high is received, the NextTargetMsgSeqNum is still incremented anyway. This causes a message to be lost.
For example say the NextTargetMsgSeqNum=500 and a Logout message with MsgSeqNum=550 is received NextTargetMsgSeqNum gets incremented to 501. Then a Logon message is received with MsgSeqNum=551 a ResendRequest is sent for 501 to 550 and MsgSeqNum 500 is lost/never received.
In the nextLogout(Message) method I think modifying the increment statement to guard against this should avoid this situation:
int msgSeqNum = message.getInt(MsgSeqNum.FIELD); if (!isTargetTooHigh(msgSeqNum)) { state.incrNextTargetMsgSeqNum(); }