Dispose Server on Exit
This commit is contained in:
parent
beadca1648
commit
e86a49d5f6
@ -46,13 +46,9 @@ public class API : IDisposable
|
|||||||
});
|
});
|
||||||
t.Start();
|
t.Start();
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
this.logger.LogError(e, e.ToString());
|
||||||
}
|
|
||||||
catch (HttpListenerException e)
|
|
||||||
{
|
|
||||||
this.logger.LogError(e, null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -179,6 +179,7 @@ public class Tracker : IDisposable
|
|||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
this._logger.LogInformation("Stopping...");
|
this._logger.LogInformation("Stopping...");
|
||||||
|
this.api.Dispose();
|
||||||
_running = false;
|
_running = false;
|
||||||
lock (_updateInfoThread)
|
lock (_updateInfoThread)
|
||||||
{
|
{
|
||||||
@ -195,5 +196,6 @@ public class Tracker : IDisposable
|
|||||||
this._logger.LogInformation("Exporting Player-States...");
|
this._logger.LogInformation("Exporting Player-States...");
|
||||||
foreach (Player player in this._players)
|
foreach (Player player in this._players)
|
||||||
player.ShuttingDownSaveSessions();
|
player.ShuttingDownSaveSessions();
|
||||||
|
this._logger.LogInformation("Done. Bye.");
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user