In XBakesModule.Get() use using() to always dispose of RestClient which disposes the stream rather than disposing the stream directly
parent
e3d07bd0cc
commit
9cff0bbd7c
|
@ -103,7 +103,9 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
|
|||
return null;
|
||||
|
||||
int size = 0;
|
||||
RestClient rc = new RestClient(m_URL);
|
||||
|
||||
using (RestClient rc = new RestClient(m_URL))
|
||||
{
|
||||
List<WearableCacheItem> ret = new List<WearableCacheItem>();
|
||||
rc.AddResourcePath("bakes");
|
||||
rc.AddResourcePath(id.ToString());
|
||||
|
@ -112,7 +114,8 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
|
|||
|
||||
try
|
||||
{
|
||||
using (Stream s = rc.Request(m_Auth))
|
||||
Stream s = rc.Request(m_Auth);
|
||||
|
||||
using (XmlTextReader sr = new XmlTextReader(s))
|
||||
{
|
||||
sr.ReadStartElement("BakedAppearance");
|
||||
|
@ -146,6 +149,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
|
|||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Store(UUID agentId, WearableCacheItem[] data)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue