Skip to content

Commit 5a2bcc4

Browse files
author
Steve Powell
committed
Use Connection.abort(…) instead of AMQConnection.close(…) in handleChannelKiller()
This actually makes the code simpler.
1 parent 8e02119 commit 5a2bcc4

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/com/rabbitmq/client/impl/DefaultExceptionHandler.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,7 @@ protected void handleChannelKiller(Channel channel, Throwable exception, String
7373
System.err.println("Failure during close of channel " + channel + " after " + exception
7474
+ ":");
7575
ioe.printStackTrace();
76-
AMQConnection conn = (AMQConnection) channel.getConnection();
77-
try {
78-
conn.close(AMQP.INTERNAL_ERROR, "Internal error closing channel for " + what,
79-
false, ioe);
80-
} catch (IOException ioeH) {
81-
// TODO: log the failure
82-
System.err.println("Failure during close of connection " + conn + " after " + ioe
83-
+ ":");
84-
ioeH.printStackTrace();
85-
}
76+
channel.getConnection().abort(AMQP.INTERNAL_ERROR, "Internal error closing channel for " + what);
8677
}
8778
}
8879
}

0 commit comments

Comments
 (0)