Skip to content
Snippets Groups Projects
Commit b4245bf7 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Set "CanShutdown" property for the service

This way the service should now finally receive the system shutdown
events and be able to properly shut itself down.

Fixes #45
parent 02ab2538
No related branches found
No related tags found
No related merge requests found
......@@ -99,6 +99,9 @@ namespace ATxService
/// AutoTx constructor
/// </summary>
public AutoTx() {
// make sure to receive system shutdown events to react properly:
CanShutdown = true;
InitializeComponent();
SetupFileLogging();
Log.Info("=".PadLeft(80, '='));
......@@ -440,6 +443,8 @@ namespace ATxService
Log.Info("RoboSharp version: [{0}]", roboAssembly.GetName().Version);
Log.Info("Robosharp product version: [{0}]", roboVersionInfo.ProductVersion);
Log.Info("=".PadLeft(80, '='));
Log.Trace($"ServiceBase.CanShutdown property: {CanShutdown}");
Log.Trace("=".PadLeft(80, '='));
}
/// <summary>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment