diff --git a/TimberWinR/Inputs/WindowsEvtInputListener.cs b/TimberWinR/Inputs/WindowsEvtInputListener.cs index 4e0c9df..0a03c34 100644 --- a/TimberWinR/Inputs/WindowsEvtInputListener.cs +++ b/TimberWinR/Inputs/WindowsEvtInputListener.cs @@ -91,12 +91,14 @@ namespace TimberWinR.Inputs } // Close the recordset rs.close(); + firstQuery = false; } catch (Exception ex) { - LogManager.GetCurrentClassLogger().Error(ex); - } - firstQuery = false; + LogManager.GetCurrentClassLogger().Error("WindowsEventListener", ex); + firstQuery = true; + oLogQuery = new LogQuery(); + } System.Threading.Thread.Sleep(_pollingIntervalInSeconds * 1000); }