mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Add a using() block around the timer script
This commit is contained in:
@@ -423,14 +423,16 @@ namespace OpenSim
|
||||
{
|
||||
m_log.Info("[COMMANDFILE]: Running " + fileName);
|
||||
|
||||
StreamReader readFile = File.OpenText(fileName);
|
||||
string currentCommand;
|
||||
while ((currentCommand = readFile.ReadLine()) != null)
|
||||
using (StreamReader readFile = File.OpenText(fileName))
|
||||
{
|
||||
if (currentCommand != String.Empty)
|
||||
string currentCommand;
|
||||
while ((currentCommand = readFile.ReadLine()) != null)
|
||||
{
|
||||
m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'");
|
||||
m_console.RunCommand(currentCommand);
|
||||
if (currentCommand != String.Empty)
|
||||
{
|
||||
m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'");
|
||||
m_console.RunCommand(currentCommand);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user