Skip to content

Fix socket address failover before successful logon - #1324

Open
elliotoakley wants to merge 1 commit into
quickfix-j:masterfrom
elliotoakley:fix/1260-socket-address-failover
Open

Fix socket address failover before successful logon#1324
elliotoakley wants to merge 1 commit into
quickfix-j:masterfrom
elliotoakley:fix/1260-socket-address-failover

Conversation

@elliotoakley

Copy link
Copy Markdown

Previously, the round-robin socket address index was reset immediately after a successful TCP connection. If an endpoint accepted the connection but closed it before completing the FIX Logon, the initiator repeatedly retried the first address instead of failing over to the next configured address.

The index is now reset only after SessionStateListener.onLogon() is invoked. A volatile flag transfers the reset request to the scheduled ConnectTask thread.

Tests verify that the initiator:

  • tries the next address when disconnected before Logon;
  • returns to the first address after a successful Logon.

Fixes #1260

@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.85%. Comparing base (cca5614) to head (9a4bc5c).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1324      +/-   ##
============================================
+ Coverage     70.81%   70.85%   +0.03%     
- Complexity     2268     2274       +6     
============================================
  Files           161      161              
  Lines          9077     9085       +8     
  Branches       1192     1193       +1     
============================================
+ Hits           6428     6437       +9     
+ Misses         2195     2193       -2     
- Partials        454      455       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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 this pull request may close these issues.

System not trying second address

1 participant