mirror of
https://github.com/opensim/opensim.git
synced 2026-05-14 18:55:39 +08:00
add some missing using(...
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user