More race conditions.

This commit is contained in:
Deathmax 2011-07-04 17:32:49 +08:00
parent 061169633d
commit 718764e533
3 changed files with 8 additions and 12 deletions

View file

@ -49,8 +49,6 @@ namespace TShockAPI
public static IDbConnection Sql;
public static bool WorldSaving = false;
public override Version Version
{
get { return VersionNum; }
@ -540,15 +538,10 @@ namespace TShockAPI
private void OnSaveWorld(bool resettime, HandledEventArgs e)
{
if (!WorldSaving)
{
WorldSaving = true;
Tools.Broadcast("Saving world, might lag.", Color.Red);
Thread SaveWorld = new Thread(Tools.SaveWorld);
SaveWorld.Start();
WorldSaving = false;
e.Handled = true;
}
Tools.Broadcast("Saving world, might lag.", Color.Red);
Thread SaveWorld = new Thread(Tools.SaveWorld);
SaveWorld.Start();
e.Handled = true;
}
/*