* Fixing the console write on shutdown where the object is already disposed.
parent
ffb6198380
commit
ba142c0410
|
@ -231,6 +231,8 @@ namespace OpenSim.Framework.Console
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WriteNewLine(ConsoleColor color, string format, params object[] args)
|
private void WriteNewLine(ConsoleColor color, string format, params object[] args)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
lock (m_syncRoot)
|
lock (m_syncRoot)
|
||||||
{
|
{
|
||||||
|
@ -269,13 +271,23 @@ namespace OpenSim.Framework.Console
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (ObjectDisposedException)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void WritePrefixLine(ConsoleColor color, string sender)
|
private void WritePrefixLine(ConsoleColor color, string sender)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
lock (m_syncRoot)
|
lock (m_syncRoot)
|
||||||
{
|
{
|
||||||
sender = sender.ToUpper();
|
sender = sender.ToUpper();
|
||||||
|
|
||||||
Log.WriteLine("[" + sender + "] ");
|
Log.WriteLine("[" + sender + "] ");
|
||||||
|
|
||||||
|
|
||||||
Log.Flush();
|
Log.Flush();
|
||||||
|
|
||||||
System.Console.Write("[");
|
System.Console.Write("[");
|
||||||
|
@ -297,6 +309,11 @@ namespace OpenSim.Framework.Console
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (ObjectDisposedException)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public string ReadLine()
|
public string ReadLine()
|
||||||
|
|
Loading…
Reference in New Issue