mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Close streams immediately when we finish using them
This commit is contained in:
@@ -188,7 +188,7 @@ namespace OpenSim.Server.Handlers.MapImage
|
||||
|
||||
rootElement.AppendChild(result);
|
||||
|
||||
return DocToBytes(doc);
|
||||
return Util.DocToBytes(doc);
|
||||
}
|
||||
|
||||
private byte[] FailureResult(string msg)
|
||||
@@ -215,18 +215,7 @@ namespace OpenSim.Server.Handlers.MapImage
|
||||
|
||||
rootElement.AppendChild(message);
|
||||
|
||||
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 System.Net.IPAddress GetCallerIP(IOSHttpRequest request)
|
||||
|
||||
Reference in New Issue
Block a user