Skip to content

Commit

Permalink
Fixed problem with onStop service being null
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterKottas committed Jun 2, 2018
1 parent d99a566 commit 173557b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/PeterKottas.DotNetCore.WindowsService/ServiceRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ public static int Run(Action<HostConfigurator<SERVICE>> runAction)
// Return the console host run result, so we get some idea what failed if result is not OK
return (int)consoleHost.Run();
}
else
{
innerConfig.Service = innerConfig.ServiceFactory(innerConfig.ExtraArguments, null);
}

ConfigureService(innerConfig);

Expand Down

0 comments on commit 173557b

Please sign in to comment.