diff --git a/QuickFIXn/Transport/SocketInitiator.cs b/QuickFIXn/Transport/SocketInitiator.cs index 4add51c5c..4fed0e3b7 100644 --- a/QuickFIXn/Transport/SocketInitiator.cs +++ b/QuickFIXn/Transport/SocketInitiator.cs @@ -178,7 +178,7 @@ 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; @@ -186,8 +186,7 @@ protected override void OnStart() } 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);