PID file is now deleted on server shutdown.
Console warning if it was shutdown improperly.
This commit is contained in:
parent
b242bfde17
commit
ec07c38b86
1 changed files with 5 additions and 0 deletions
|
|
@ -97,6 +97,7 @@ namespace TShockAPI
|
|||
{
|
||||
if (File.Exists(Path.Combine(SavePath, "tshock.pid")))
|
||||
{
|
||||
Log.ConsoleInfo("TShock was improperly shut down. Deleting invalid pid file...");
|
||||
File.Delete(Path.Combine(SavePath, "tshock.pid"));
|
||||
}
|
||||
|
||||
|
|
@ -195,6 +196,10 @@ namespace TShockAPI
|
|||
NetHooks.GetData -= GetData;
|
||||
NetHooks.GreetPlayer -= OnGreetPlayer;
|
||||
NpcHooks.StrikeNpc -= NpcHooks_OnStrikeNpc;
|
||||
if (File.Exists(Path.Combine(SavePath, "tshock.pid")))
|
||||
{
|
||||
File.Delete(Path.Combine(SavePath, "tshock.pid"));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue