Dispose Server on Exit
This commit is contained in:
parent
beadca1648
commit
e86a49d5f6
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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.");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user