8000 Re-throw timeout exception unless aborting · ftt1024/rabbitmq-java-client@3f2dc78 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3f2dc78

Browse files
Re-throw timeout exception unless aborting
1 parent a1156ad commit 3f2dc78

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,7 @@ protected void close(int closeCode,
537537
boolean initiatedByApplication,
538538
Throwable cause,
539539
boolean abort)
540-
throws IOException
541-
{
540+
throws IOException, TimeoutException {
542541
// First, notify all our dependents that we are shutting down.
543542
// This clears isOpen(), so no further work from the
544543
// application side will be accepted, and any inbound commands
@@ -571,11 +570,11 @@ public AMQCommand transformReply(AMQCommand command) {
571570
// we wait for the reply. We ignore the result.
572571
// (It's NOT always close-ok.)
573572
notify = true;
574-
// Should not wait indefinately, since if the server is congested
575-
// the call will lock and never return. This stalls and kills the current thread.
573+
// do not wait indefinitely
576574
k.getReply(10000);
577575
} catch (TimeoutException ise) {
578-
// Will never happen since we wait infinitely
576+
if (!abort)
577+
throw ise;
579578
} catch (ShutdownSignalException sse) {
580579
if (!abort)
581580
throw sse;

0 commit comments

Comments
 (0)
0