Permalink
Browse files

Use Connection.abort(…) instead of AMQConnection.close(…) in handleCh…

…annelKiller()

This actually makes the code simpler.
  • Loading branch information...
1 parent 8e02119 commit 5a2bcc42bf40399b1215b4668201d08094bfc5eb @Zteve Zteve committed May 1, 2012
Showing with 1 addition and 10 deletions.
  1. +1 −10 src/com/rabbitmq/client/impl/DefaultExceptionHandler.java
@@ -73,16 +73,7 @@ protected void handleChannelKiller(Channel channel, Throwable exception, String
System.err.println("Failure during close of channel " + channel + " after " + exception
+ ":");
ioe.printStackTrace();
- AMQConnection conn = (AMQConnection) channel.getConnection();
- try {
- conn.close(AMQP.INTERNAL_ERROR, "Internal error closing channel for " + what,
- false, ioe);
- } catch (IOException ioeH) {
- // TODO: log the failure
- System.err.println("Failure during close of connection " + conn + " after " + ioe
- + ":");
- ioeH.printStackTrace();
- }
+ channel.getConnection().abort(AMQP.INTERNAL_ERROR, "Internal error closing channel for " + what);
}
}
}

0 comments on commit 5a2bcc4

Please sign in to comment.