From 2db5de3e7217ca4bd9fcaf5345ea5672b5d6663f Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sat, 2 Feb 2008 07:35:51 +0000 Subject: Added commands to change config file from console: CONFIG SET section key value value value CONFIG GET section key CONFIG SAVE (it saves, but does it save correctly?:) ScriptEngine will react correctly to any config change made while it is running. --- OpenSim/Framework/Data.MySQL/MySQLDataStore.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework/Data.MySQL/MySQLDataStore.cs') diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs index 45d0720..b25924c 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs @@ -415,11 +415,12 @@ namespace OpenSim.Framework.Data.MySQL } } + static Random rnd = new Random(); public void StoreLandObject(Land parcel, LLUUID regionUUID) { // Does the new locking fix it? - //MainLog.Instance.Verbose("DATASTORE", "Tedds temp fix: Waiting 3 seconds for stuff to catch up. (Someone please fix! :))"); - //System.Threading.Thread.Sleep(3000); + MainLog.Instance.Verbose("DATASTORE", "Tedds temp fix: Waiting 3 seconds for stuff to catch up. (Someone please fix! :))"); + System.Threading.Thread.Sleep(2500 + rnd.Next(300, 900)); lock (DBAccessLock) { @@ -1469,7 +1470,16 @@ namespace OpenSim.Framework.Data.MySQL if (conn.State != ConnectionState.Open) { - conn.Open(); + try + { + conn.Open(); + } + catch (Exception ex) + { + MainLog.Instance.Error("MySql", "Error connecting to MySQL server: " + ex.Message); + MainLog.Instance.Error("MySql", "Application is terminating!"); + System.Threading.Thread.CurrentThread.Abort(); + } } try -- cgit v1.1