Don't report errors if the transport is being closed.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@383315 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-03-05 13:20:48 +00:00
parent bfe91884be
commit e6ad61952e
2 changed files with 13 additions and 3 deletions

View File

@ -114,9 +114,19 @@ namespace ActiveMQ.Transport.Tcp
{ {
break; break;
} }
catch ( IOException e) {
if( e.GetBaseException() is ObjectDisposedException ) {
break;
}
if( !closed ) {
this.exceptionHandler(this,e);
}
}
catch (Exception e) catch (Exception e)
{ {
this.exceptionHandler(this,e); if( !closed ) {
this.exceptionHandler(this,e);
}
} }
} }
} }

View File

@ -65,10 +65,10 @@ namespace JMS
{ {
if (connection != null) if (connection != null)
{ {
Console.WriteLine("Disconnectting..."); Console.WriteLine("Disconnecting...");
connection.Dispose(); connection.Dispose();
connection = null; connection = null;
Console.WriteLine("Disconnectted."); Console.WriteLine("Disconnected.");
} }
} }