Add a using() block around the timer script
parent
5de1ec735c
commit
496b368334
|
@ -423,14 +423,16 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
m_log.Info("[COMMANDFILE]: Running " + fileName);
|
m_log.Info("[COMMANDFILE]: Running " + fileName);
|
||||||
|
|
||||||
StreamReader readFile = File.OpenText(fileName);
|
using (StreamReader readFile = File.OpenText(fileName))
|
||||||
string currentCommand;
|
|
||||||
while ((currentCommand = readFile.ReadLine()) != null)
|
|
||||||
{
|
{
|
||||||
if (currentCommand != String.Empty)
|
string currentCommand;
|
||||||
|
while ((currentCommand = readFile.ReadLine()) != null)
|
||||||
{
|
{
|
||||||
m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'");
|
if (currentCommand != String.Empty)
|
||||||
m_console.RunCommand(currentCommand);
|
{
|
||||||
|
m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'");
|
||||||
|
m_console.RunCommand(currentCommand);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue