Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 52f26f8

Browse files
nikita2206acogoluegnes
authored andcommittedJan 23, 2023
Report publish failures for the closed channel as well
(cherry picked from commit a186078)
1 parent df9fb69 commit 52f26f8

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ public void basicPublish(String exchange, String routingKey,
708708
.build(), props, body);
709709
try {
710710
transmit(command);
711-
} catch (IOException e) {
711+
} catch (IOException | AlreadyClosedException e) {
712712
metricsCollector.basicPublishFailure(this, e);
713713
throw e;
714714
}
@@ -1489,7 +1489,7 @@ public Consumer transformReply(AMQCommand replyCommand) {
14891489

14901490

14911491
rpc(m, k);
1492-
1492+
14931493
try {
14941494
if(_rpcTimeout == NO_RPC_TIMEOUT) {
14951495
k.getReply(); // discard result

0 commit comments

Comments
 (0)
Please sign in to comment.