Browse Source

Merge pull request #50 from eel/fix-failure-reset-period

Use total seconds of TimeSpan for reset period
Oleg Nenashev 11 years ago
parent
commit
57ba48100f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Advapi32.cs

+ 1 - 1
Advapi32.cs

@@ -49,7 +49,7 @@ namespace winsw
         public void ChangeConfig(TimeSpan failureResetPeriod, List<SC_ACTION> actions)
         public void ChangeConfig(TimeSpan failureResetPeriod, List<SC_ACTION> actions)
         {
         {
             SERVICE_FAILURE_ACTIONS sfa = new SERVICE_FAILURE_ACTIONS();
             SERVICE_FAILURE_ACTIONS sfa = new SERVICE_FAILURE_ACTIONS();
-            sfa.dwResetPeriod = failureResetPeriod.Seconds;
+            sfa.dwResetPeriod = (int)failureResetPeriod.TotalSeconds;
             sfa.lpRebootMsg = ""; // delete message
             sfa.lpRebootMsg = ""; // delete message
             sfa.lpCommand = "";   // delete the command to run
             sfa.lpCommand = "";   // delete the command to run