@@ -422,22 +422,22 @@ protected void processDelivery(Command command, Basic.Deliver method) {
422
422
command .getContentBody ());
423
423
} catch (Throwable ex ) {
424
424
getConnection ().getExceptionHandler ().handleConsumerException (this ,
425
- ex ,
426
- callback ,
427
- m .getConsumerTag (),
428
- "handleDelivery" );
425
+ ex ,
426
+ callback ,
427
+ m .getConsumerTag (),
428
+ "handleDelivery" );
429
429
}
430
430
}
431
431
432
432
private void callReturnListeners (Command command , Basic .Return basicReturn ) {
433
433
try {
434
434
for (ReturnListener l : this .returnListeners ) {
435
435
l .handleReturn (basicReturn .getReplyCode (),
436
- basicReturn .getReplyText (),
437
- basicReturn .getExchange (),
438
- basicReturn .getRoutingKey (),
439
- (BasicProperties ) command .getContentHeader (),
440
- command .getContentBody ());
436
+ basicReturn .getReplyText (),
437
+ basicReturn .getExchange (),
438
+ basicReturn .getRoutingKey (),
439
+ (BasicProperties ) command .getContentHeader (),
440
+ command .getContentBody ());
441
441
}
442
442
} catch (Throwable ex ) {
443
443
getConnection ().getExceptionHandler ().handleReturnListenerException (this , ex );
@@ -493,15 +493,13 @@ private void asyncShutdown(Command command) throws IOException {
493
493
494
494
/** Public API - {@inheritDoc} */
495
495
public void close ()
496
- throws IOException
497
- {
496
+ throws IOException , TimeoutException {
498
497
close (AMQP .REPLY_SUCCESS , "OK" );
499
498
}
500
499
501
500
/** Public API - {@inheritDoc} */
502
501
public void close (int closeCode , String closeMessage )
503
- throws IOException
504
- {
502
+ throws IOException , TimeoutException {
505
503
close (closeCode , closeMessage , true , null , false );
506
504
}
507
505
@@ -517,8 +515,12 @@ public void abort(int closeCode, String closeMessage)
517
515
throws IOException
518
516
{
519
517
try {
520
- close (closeCode , closeMessage , true , null , true );
521
- } catch (IOException _e ) { /* ignored */ }
518
+ close (closeCode , closeMessage , true , null , true );
519
+ } catch (IOException _e ) {
520
+ /* ignored */
521
+ } catch (TimeoutException _e ) {
522
+ /* ignored */
523
+ }
522
524
}
523
525
524
526
/**
0 commit comments