Skip to content

Commit a186078

Browse files
committed
Report publish failures for the closed channel as well
1 parent a4d003d commit a186078

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/rabbitmq/client/impl/ChannelN.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ public void basicPublish(String exchange, String routingKey,
710710
.build(), props, body);
711711
try {
712712
transmit(command);
713-
} catch (IOException e) {
713+
} catch (IOException | AlreadyClosedException e) {
714714
metricsCollector.basicPublishFailure(this, e);
715715
throw e;
716716
}
@@ -1493,7 +1493,7 @@ public Consumer transformReply(AMQCommand replyCommand) {
14931493

14941494

14951495
rpc(m, k);
1496-
1496+
14971497
try {
14981498
if(_rpcTimeout == NO_RPC_TIMEOUT) {
14991499
k.getReply(); // discard result

0 commit comments

Comments
 (0)