Skip to content

Commit 509d433

Browse files
Update Server.cs
1 parent 1b12de7 commit 509d433

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

Flames/Server/Server.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,10 @@ public static Thread Stop(bool restart, string msg)
241241

242242
public static void ShutdownThread(bool restarting, string msg)
243243
{
244+
244245
try
245246
{
246-
Logger.Log(LogType.SystemActivity, "Server shutting down ({0})", msg);
247+
Logger.Log(LogType.SystemActivity, "Server restarting ({0})", msg);
247248
}
248249
catch { }
249250

@@ -276,7 +277,7 @@ public static void ShutdownThread(bool restarting, string msg)
276277
Logger.LogError(ex);
277278
}
278279

279-
OnShuttingDownEvent.Call(restarting, msg);
280+
OnShuttingDownEvent.Call(true, msg);
280281
#if !F_DOTNET
281282
Plugin.UnloadAll();
282283
Plugin_Simple.UnloadAll();
@@ -298,7 +299,7 @@ public static void ShutdownThread(bool restarting, string msg)
298299

299300
try
300301
{
301-
Logger.Log(LogType.SystemActivity, "Server shutdown completed");
302+
Logger.Log(LogType.SystemActivity, "Server restarting...");
302303
}
303304
catch
304305
{
@@ -311,12 +312,12 @@ public static void ShutdownThread(bool restarting, string msg)
311312
{
312313
}
313314

314-
if (restarting)
315-
{
316-
IOperatingSystem.DetectOS().RestartProcess();
315+
//if (restarting)
316+
//{
317+
IOperatingSystem.DetectOS().RestartProcess();
317318
// TODO: FileLogger.Flush again maybe for if execvp fails?
318-
}
319-
Environment.Exit(0);
319+
//}
320+
//Environment.Exit(0);
320321
}
321322

322323
public static string SaveAllLevels()

0 commit comments

Comments
 (0)