From 932ed5ec549ff3f6c4ea50963f9be1d9902e446b Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sat, 12 Jul 2008 18:05:57 +0000 Subject: [PATCH] Mantis#1726. Thank you kindly, StrawberryFride for a patch that: On an MSSQL-based Grid OpenSim installation, users could log in to the sim once, then log off - after a short time before retrying users would be unable to log in, and would see an empty alert box on the client with just a "close" button and no text. Despite no users being logged into the sim, user server would report a higher number of logins than logouts. --- OpenSim/Data/MSSQL/MSSQLGridData.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenSim/Data/MSSQL/MSSQLGridData.cs b/OpenSim/Data/MSSQL/MSSQLGridData.cs index e2b0dd63e0..1ed412bdc8 100644 --- a/OpenSim/Data/MSSQL/MSSQLGridData.cs +++ b/OpenSim/Data/MSSQL/MSSQLGridData.cs @@ -149,6 +149,10 @@ namespace OpenSim.Data.MSSQL IDataReader reader = null; try { + if (database.getConnection().State == ConnectionState.Closed) + { + database.Reconnect(); + } Dictionary param = new Dictionary(); param["handle"] = handle.ToString(); IDbCommand result = database.Query("SELECT * FROM " + m_regionsTableName + " WHERE regionHandle = @handle", param);