From 9e6b38078a700affa3ed40fc81f9c04f70bb93b7 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 18 Aug 2008 21:18:59 +0000 Subject: * Properly dispose of the reader after readAttachments() has finished with it in the Mysql User data manager --- OpenSim/Data/MySQL/MySQLManager.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index 3a62ec2..9f50c9f 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs @@ -660,13 +660,12 @@ namespace OpenSim.Data.MySQL return appearance; } - // Read attachment list from data reader public Hashtable readAttachments(IDataReader r) { Hashtable ret = new Hashtable(); - while(r.Read()) + while (r.Read()) { int attachpoint = Convert.ToInt32(r["attachpoint"]); if(ret.ContainsKey(attachpoint)) @@ -677,6 +676,8 @@ namespace OpenSim.Data.MySQL ret.Add(attachpoint, item); } + + r.Close(); return ret; } -- cgit v1.1