add some missing using(...

This commit is contained in:
UbitUmarov
2021-10-14 18:17:28 +01:00
parent 7dc9f14aef
commit 60c99756ed
3 changed files with 16 additions and 12 deletions

View File

@@ -80,16 +80,18 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
try
{
HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
m_log.Debug("[WEBLOADER]: Downloading region information...");
StreamReader reader = new StreamReader(webResponse.GetResponseStream());
string xmlSource = String.Empty;
string tempStr = reader.ReadLine();
while (tempStr != null)
m_log.Debug("[WEBLOADER]: Downloading region information...");
using (HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse())
using (StreamReader reader = new StreamReader(webResponse.GetResponseStream()))
{
xmlSource = xmlSource + tempStr;
tempStr = reader.ReadLine();
string tempStr;
while ((tempStr = reader.ReadLine()) != null)
{
xmlSource += tempStr;
}
}
m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " +
xmlSource.Length);
XmlDocument xmlDoc = new XmlDocument();