diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Data.MySQL/MySQLDataStore.cs | 16 |
1 files changed, 13 insertions, 3 deletions
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 | |||
415 | } | 415 | } |
416 | } | 416 | } |
417 | 417 | ||
418 | static Random rnd = new Random(); | ||
418 | public void StoreLandObject(Land parcel, LLUUID regionUUID) | 419 | public void StoreLandObject(Land parcel, LLUUID regionUUID) |
419 | { | 420 | { |
420 | // Does the new locking fix it? | 421 | // Does the new locking fix it? |
421 | //MainLog.Instance.Verbose("DATASTORE", "Tedds temp fix: Waiting 3 seconds for stuff to catch up. (Someone please fix! :))"); | 422 | MainLog.Instance.Verbose("DATASTORE", "Tedds temp fix: Waiting 3 seconds for stuff to catch up. (Someone please fix! :))"); |
422 | //System.Threading.Thread.Sleep(3000); | 423 | System.Threading.Thread.Sleep(2500 + rnd.Next(300, 900)); |
423 | 424 | ||
424 | lock (DBAccessLock) | 425 | lock (DBAccessLock) |
425 | { | 426 | { |
@@ -1469,7 +1470,16 @@ namespace OpenSim.Framework.Data.MySQL | |||
1469 | 1470 | ||
1470 | if (conn.State != ConnectionState.Open) | 1471 | if (conn.State != ConnectionState.Open) |
1471 | { | 1472 | { |
1472 | conn.Open(); | 1473 | try |
1474 | { | ||
1475 | conn.Open(); | ||
1476 | } | ||
1477 | catch (Exception ex) | ||
1478 | { | ||
1479 | MainLog.Instance.Error("MySql", "Error connecting to MySQL server: " + ex.Message); | ||
1480 | MainLog.Instance.Error("MySql", "Application is terminating!"); | ||
1481 | System.Threading.Thread.CurrentThread.Abort(); | ||
1482 | } | ||
1473 | } | 1483 | } |
1474 | 1484 | ||
1475 | try | 1485 | try |