mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Close streams immediately when we finish using them
This commit is contained in:
@@ -315,7 +315,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
|
||||
|
||||
rootElement.AppendChild(result);
|
||||
|
||||
return DocToBytes(doc);
|
||||
return Util.DocToBytes(doc);
|
||||
}
|
||||
|
||||
private byte[] FailureResult()
|
||||
@@ -337,18 +337,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
|
||||
|
||||
rootElement.AppendChild(result);
|
||||
|
||||
return DocToBytes(doc);
|
||||
}
|
||||
|
||||
private byte[] DocToBytes(XmlDocument doc)
|
||||
{
|
||||
MemoryStream ms = new MemoryStream();
|
||||
XmlTextWriter xw = new XmlTextWriter(ms, null);
|
||||
xw.Formatting = Formatting.Indented;
|
||||
doc.WriteTo(xw);
|
||||
xw.Flush();
|
||||
|
||||
return ms.ToArray();
|
||||
return Util.DocToBytes(doc);
|
||||
}
|
||||
|
||||
private byte[] ResultToBytes(Dictionary<string, object> result)
|
||||
|
||||
Reference in New Issue
Block a user