Skip to content

Commit

Permalink
one more NonSessionLog call
Browse files Browse the repository at this point in the history
Should have been in PR connamara#830, I missed it
  • Loading branch information
gbirchmeier committed Jun 27, 2024
1 parent de1898f commit 5fb2582
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions QuickFIXn/Transport/SocketInitiator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,15 @@ protected override void OnStart()
double reconnectIntervalAsMilliseconds = 1000 * _reconnectInterval;
DateTime nowDt = DateTime.UtcNow;

if ((nowDt.Subtract(_lastConnectTimeDt).TotalMilliseconds) >= reconnectIntervalAsMilliseconds)
if (nowDt.Subtract(_lastConnectTimeDt).TotalMilliseconds >= reconnectIntervalAsMilliseconds)
{
Connect();
_lastConnectTimeDt = nowDt;
}
}
catch (Exception e)
{
// TODO: temporary hack, need to implement a session-independent log
File.AppendAllText("SocketInitiator-OnStart-Failure.log", $"{DateTime.Now:G}: {e}{Environment.NewLine}");
_nonSessionLog.OnEvent($"Failed to start: {e}");
}

Thread.Sleep(1 * 1000);
Expand Down

0 comments on commit 5fb2582

Please sign in to comment.