Skip to content

Commit 23a9a58

Browse files
author
Simon MacMullen
committed
Although basic.ack is async, the channel could have already closed before we get to the txCommit(). There are several similar looking try/catch blocks in this class, but they all check the expression inside the try fails, not the expression immediately before it.
1 parent df3d31a commit 23a9a58

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/src/com/rabbitmq/client/test/functional/TransactionsBase.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package com.rabbitmq.client.test.functional;
1919

2020
import com.rabbitmq.client.AMQP;
21+
import com.rabbitmq.client.AlreadyClosedException;
2122
import com.rabbitmq.client.test.BrokerTestCase;
2223
import java.io.IOException;
2324

@@ -236,6 +237,9 @@ public void testUnknownTagAck()
236237
catch (IOException e) {
237238
checkShutdownSignal(AMQP.PRECONDITION_FAILED, e);
238239
}
240+
catch (AlreadyClosedException e) {
241+
checkShutdownSignal(AMQP.PRECONDITION_FAILED, e);
242+
}
239243
connection = null;
240244
openConnection();
241245
}

0 commit comments

Comments
 (0)