diff --git a/lib/mitel-api b/lib/mitel-api index db3a4da..745aecc 160000 --- a/lib/mitel-api +++ b/lib/mitel-api @@ -1 +1 @@ -Subproject commit db3a4da09c66f53112b82eeada213c0f493d4bb7 +Subproject commit 745aecc0949db0dc2a7a20224989dd11176ec443 diff --git a/src/ommstats/Program.cs b/src/ommstats/Program.cs index d97b713..6cb5660 100644 --- a/src/ommstats/Program.cs +++ b/src/ommstats/Program.cs @@ -73,7 +73,7 @@ static async Task Main(string[] args) } catch (SocketException ex) { - logger.LogError(ex, "Error while executing OmmStats"); + logger.LogError(ex, "Connection error while executing OmmStats"); } catch (Exception ex) { @@ -81,6 +81,17 @@ static async Task Main(string[] args) throw; } Console.CancelKeyPress -= Cancelled; + if (!cts.IsCancellationRequested) + { + try + { + cts.Cancel(); + } + catch + { + //don't care, something else failed before + } + } void Cancelled(object s, ConsoleCancelEventArgs e) { logger.LogInformation("stopping...");