Skip to content

Commit 42ce342

Browse files
author
Alexandru Scvortov
committed
special connection closing message
1 parent ca7c226 commit 42ce342

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public void waitForConfirmsOrDie()
188188
throws IOException, InterruptedException
189189
{
190190
if (!waitForConfirms()) {
191-
close(AMQP.REPLY_SUCCESS, "OK", true,
191+
close(AMQP.REPLY_SUCCESS, "NACKS RECEIVED", true,
192192
new RuntimeException("received nack"), false);
193193
throw new IOException(Utility.fixStackTrace(getCloseReason()));
194194
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ public void testWaitForConfirmsException()
261261
try {
262262
channel.waitForConfirmsOrDie();
263263
fail("waitAcks worked on a closed channel");
264-
} catch (IOException e) {
264+
} catch (IOException ioe) {
265+
if (ioe.getCause() == null || !(ioe.getCause() instanceof RuntimeException))
266+
fail("got the wrong exception :(");
265267
//whoosh; everything ok
266268
} catch (InterruptedException e) {
267269
// whoosh; we should probably re-run, though

0 commit comments

Comments
 (0)