Skip to content

Commit

Permalink
shutdown stabilization
Browse files Browse the repository at this point in the history
  • Loading branch information
nleach999 committed Oct 24, 2022
1 parent 5c06d5d commit 09ff8f8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 16 deletions.
4 changes: 0 additions & 4 deletions Applications/CxAnalytixCLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,5 @@ static void Main(string[] args)
});
}

private static void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e)
{
throw new NotImplementedException();
}
}
}
11 changes: 0 additions & 11 deletions Applications/CxAnalytixDaemon/Daemon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@ public void Dispose()
public Task StartAsync(CancellationToken cancellationToken)
{
_cancelToken = new CancellationTokenSource();
_cancelToken.Token.Register(() =>
{
var token = new CancellationTokenSource();

using (var task = StopAsync(token.Token) )
{
if (!_serviceTask.Wait(120000))
token.Cancel();
}
});


_serviceTask = Task.Run( () =>
{
Expand Down
1 change: 0 additions & 1 deletion Applications/CxAnalytixService/ServiceLifecycleControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ protected override void OnStart(string[] args)
base.OnStart(args);

_cancelToken = new CancellationTokenSource();
_cancelToken.Token.Register(stopService);

_serviceTask = Task.Run( () =>
{
Expand Down
3 changes: 3 additions & 0 deletions Libs/Executive/ExecuteLoop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using log4net;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
Expand Down Expand Up @@ -46,6 +47,8 @@ private static void Fatal(Exception ex, CancellationTokenSource ct)
{
appLog.Error("Fatal exception caught, program ending.", ex);
ct.Cancel();
Process.GetCurrentProcess().Kill(true);

}


Expand Down

0 comments on commit 09ff8f8

Please sign in to comment.