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);