Skip to content

Commit

Permalink
Merge pull request #674 from ackleymi/toadmin-fix
Browse files Browse the repository at this point in the history
Reverts ToAdmin call sequencing
  • Loading branch information
ackleymi authored Sep 20, 2024
2 parents 2903198 + 393a748 commit b7fa96b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion session.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ func (s *session) prepMessageForSend(msg *Message, inReplyTo *Message) (msgBytes
}

if isAdminMessageType(msgType) {
s.application.ToAdmin(msg, s.sessionID)
if bytes.Equal(msgType, msgTypeLogon) {
var resetSeqNumFlag FIXBoolean
if msg.Body.Has(tagResetSeqNumFlag) {
Expand All @@ -374,7 +375,6 @@ func (s *session) prepMessageForSend(msg *Message, inReplyTo *Message) (msgBytes
msg.Header.SetField(tagMsgSeqNum, FIXInt(seqNum))
}
}
s.application.ToAdmin(msg, s.sessionID)
} else {
if err = s.application.ToApp(msg, s.sessionID); err != nil {
return
Expand Down

0 comments on commit b7fa96b

Please sign in to comment.