= Corrected edge case of null string parsing

This commit is contained in:
Matthew Cech
2019-04-13 12:46:17 -07:00
parent 5fd6ea0c27
commit d36de01be5
4 changed files with 12 additions and 9 deletions
+6 -3
View File
@@ -11,6 +11,8 @@ import dataStructures.KittyRole;
import dataStructures.KittyUser;
import dataStructures.Response;
import dataStructures.UserInput;
import utils.GlobalLog;
import utils.LogFilter;
// NOTE(wisp): This is a sort of special command.
public class CommandShutdown extends Command
@@ -41,13 +43,14 @@ public class CommandShutdown extends Command
if(isSafe)
{
DatabaseManager.instance.Upkeep(); // Force upkeep, this works so long as on main thread.
res.CallImmediate(Localizer.Stub("Forced shutdown, database synced before abandoning threads."));
// Force upkeep, this works so long as upkeep is on the main thread.
DatabaseManager.instance.Upkeep();
GlobalLog.Error(LogFilter.Command, "Forced shutdown, database synced before abandoning threads.");
System.exit(0);
}
else
{
res.CallImmediate(Localizer.Stub("Forced immediate shutdown, threads abandoned without sync."));
GlobalLog.Error(LogFilter.Command, "Forced immediate shutdown, threads abandoned without sync.");
System.exit(0);
}
}