diff --git a/SteamGameTimeTrack/API.cs b/SteamGameTimeTrack/API.cs index 8ac0ae4..9e459c7 100644 --- a/SteamGameTimeTrack/API.cs +++ b/SteamGameTimeTrack/API.cs @@ -46,13 +46,9 @@ public class API : IDisposable }); t.Start(); } - catch (OperationCanceledException) + catch (Exception e) { - - } - catch (HttpListenerException e) - { - this.logger.LogError(e, null); + this.logger.LogError(e, e.ToString()); } } } diff --git a/SteamGameTimeTrack/Tracker.cs b/SteamGameTimeTrack/Tracker.cs index 62f73cb..1cd8c09 100644 --- a/SteamGameTimeTrack/Tracker.cs +++ b/SteamGameTimeTrack/Tracker.cs @@ -179,6 +179,7 @@ public class Tracker : IDisposable public void Dispose() { this._logger.LogInformation("Stopping..."); + this.api.Dispose(); _running = false; lock (_updateInfoThread) { @@ -195,5 +196,6 @@ public class Tracker : IDisposable this._logger.LogInformation("Exporting Player-States..."); foreach (Player player in this._players) player.ShuttingDownSaveSessions(); + this._logger.LogInformation("Done. Bye."); } } \ No newline at end of file