Skip to content

Commit

Permalink
Use Connection.abort(…) instead of AMQConnection.close(…) in handleCh…
Browse files Browse the repository at this point in the history
…annelKiller()

This actually makes the code simpler.
  • Loading branch information
Steve Powell committed May 1, 2012
1 parent 8e02119 commit 5a2bcc4
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/com/rabbitmq/client/impl/DefaultExceptionHandler.java
Expand Up @@ -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.