Skip to content

Commit

Permalink
Use Ticks in place of clientID to avoid debug log file name clash
Browse files Browse the repository at this point in the history
clientId can clash if there's more than one Acceptor endpoint listening on different IP or Port but trying to write to the same debug log file as all starting at 0.  

Using ticks to hopefully keep unique in between each client logon attempt.
  • Loading branch information
Aidan Chisholm authored and gbirchmeier committed Mar 9, 2020
1 parent 264f252 commit 82a4537
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion QuickFIXn/ClientHandlerThread.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public ClientHandlerThread(TcpClient tcpClient, long clientId, QuickFix.Dictiona
debugLogFilePath = settingsDict.GetString(SessionSettings.FILE_LOG_PATH);

// FIXME - do something more flexible than hardcoding a filelog
log_ = new FileLog(debugLogFilePath, new SessionID("ClientHandlerThread", clientId.ToString(), "Debug"));
log_ = new FileLog(debugLogFilePath, new SessionID("ClientHandlerThread", DateTime.UtcNow.Ticks.ToString(), "Debug"));

this.Id = clientId;
socketReader_ = new SocketReader(tcpClient, socketSettings, this);
Expand Down

0 comments on commit 82a4537

Please sign in to comment.