Skip to content

Commit

Permalink
Merge branch 'martinadams-issue_#280'
Browse files Browse the repository at this point in the history
  • Loading branch information
mgatny committed Jul 17, 2015
2 parents 4c298a0 + e2526d2 commit 2148c0b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions NEXT_VERSION.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Changes since the last version (oldest first):
* (patch) #283 - fix to ensure IApplication.FromAdmin() gets called for received resend requests (martinadams)
* (minor) #312 - New config option: can force session-level rejects to be resent (martinadams)
* (minor) #270/#146 - Correct rejection behavior when msg groups do not use correct delimiter tag (gbirchmeier)
* (patch) #280 - fix to prevent StackOverflowException due to recursion (martinadams)


NOTE: Breaking changes in next release
Expand Down
18 changes: 11 additions & 7 deletions QuickFIXn/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,16 @@ public void Next()
/// </summary>
/// <param name="msgStr"></param>
public void Next(string msgStr)
{
NextMessage(msgStr);
NextQueued();
}

/// <summary>
/// Process a message (in string form) from the counterparty
/// </summary>
/// <param name="msgStr"></param>
private void NextMessage(string msgStr)
{
this.Log.OnIncoming(msgStr);

Expand Down Expand Up @@ -657,7 +667,6 @@ internal void Next(MessageBuilder msgBuilder)
Disconnect(e.ToString());
}

NextQueued();
Next();
}

Expand Down Expand Up @@ -713,7 +722,6 @@ protected void NextLogon(Message logon)
else
{
state_.IncrNextTargetMsgSeqNum();
NextQueued();
}

if (this.IsLoggedOn)
Expand All @@ -726,7 +734,6 @@ protected void NextTestRequest(Message testRequest)
return;
GenerateHeartbeat(testRequest);
state_.IncrNextTargetMsgSeqNum();
NextQueued();
}

protected void NextResendRequest(Message resendReq)
Expand Down Expand Up @@ -871,7 +878,6 @@ protected void NextHeartbeat(Message heartbeat)
if (!Verify(heartbeat))
return;
state_.IncrNextTargetMsgSeqNum();
NextQueued();
}

protected void NextSequenceReset(Message sequenceReset)
Expand Down Expand Up @@ -1573,15 +1579,13 @@ protected bool NextQueued(int num)
}
else
{
Next(msg.ToString());
NextMessage(msg.ToString());
}
return true;
}
return false;
}



private bool IsAdminMessage(Message msg)
{
var msgType = msg.Header.GetString(Fields.Tags.MsgType);
Expand Down

0 comments on commit 2148c0b

Please sign in to comment.