File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/com/rabbitmq/client/impl Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -537,8 +537,7 @@ protected void close(int closeCode,
537
537
boolean initiatedByApplication ,
538
538
Throwable cause ,
539
539
boolean abort )
540
- throws IOException
541
- {
540
+ throws IOException , TimeoutException {
542
541
// First, notify all our dependents that we are shutting down.
543
542
// This clears isOpen(), so no further work from the
544
543
// application side will be accepted, and any inbound commands
@@ -571,11 +570,11 @@ public AMQCommand transformReply(AMQCommand command) {
571
570
// we wait for the reply. We ignore the result.
572
571
// (It's NOT always close-ok.)
573
572
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
576
574
k .getReply (10000 );
577
575
} catch (TimeoutException ise ) {
578
- // Will never happen since we wait infinitely
576
+ if (!abort )
577
+ throw ise ;
579
578
} catch (ShutdownSignalException sse ) {
580
579
if (!abort )
581
580
throw sse ;
You can’t perform that action at this time.
0 commit comments