* Fixing the console write on shutdown where the object is already disposed.

ThreadPoolClientBranch
Teravus Ovares 2008-02-05 02:10:01 +00:00
parent ffb6198380
commit ba142c0410
1 changed files with 64 additions and 47 deletions

View File

@ -231,6 +231,8 @@ namespace OpenSim.Framework.Console
}
private void WriteNewLine(ConsoleColor color, string format, params object[] args)
{
try
{
lock (m_syncRoot)
{
@ -269,13 +271,23 @@ namespace OpenSim.Framework.Console
return;
}
}
catch (ObjectDisposedException)
{
return;
}
}
private void WritePrefixLine(ConsoleColor color, string sender)
{
try
{
lock (m_syncRoot)
{
sender = sender.ToUpper();
Log.WriteLine("[" + sender + "] ");
Log.Flush();
System.Console.Write("[");
@ -297,6 +309,11 @@ namespace OpenSim.Framework.Console
return;
}
}
catch (ObjectDisposedException)
{
return;
}
}
public string ReadLine()