Changeset 1072


Ignore:
Timestamp:
6/1/2009 11:45:47 AM (5 years ago)
Author:
lowjoel
Message:

When clearing entries from the log make sure that the last entry isn't deleted or else new log entries won't have a session to go into - this will then crash. POrobably this is one sign that a new logging design is in order...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Eraser.Manager/Logger.cs

    r932 r1072  
    140140            lock (Entries) 
    141141            { 
     142                LogEntryCollection lastSessionEntries = null; 
     143                if (Entries.ContainsKey(lastSession)) 
     144                    lastSessionEntries = Entries[lastSession]; 
    142145                Entries.Clear(); 
    143                 lastSession = DateTime.MinValue; 
     146 
     147                if (lastSessionEntries != null) 
     148                    Entries.Add(lastSession, lastSessionEntries); 
    144149            } 
    145150        } 
Note: See TracChangeset for help on using the changeset viewer.