File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/main/java/com/rabbitmq/client/impl Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 3737import com .rabbitmq .client .impl .AMQImpl .Tx ;
3838import com .rabbitmq .utility .Utility ;
3939
40+ import org .slf4j .Logger ;
41+ import org .slf4j .LoggerFactory ;
42+
4043/**
4144 * Main interface to AMQP protocol functionality. Public API -
4245 * Implementation of all AMQChannels except channel zero.
4952 */
5053public class ChannelN extends AMQChannel implements com .rabbitmq .client .Channel {
5154 private static final String UNSPECIFIED_OUT_OF_BAND = "" ;
55+ private static final Logger LOGGER = LoggerFactory .getLogger (ChannelN .class );
5256
5357 /** Map from consumer tag to {@link Consumer} instance.
5458 * <p/>
@@ -1275,7 +1279,8 @@ public void basicCancel(final String consumerTag)
12751279 BlockingRpcContinuation <Consumer > k = new BlockingRpcContinuation <Consumer >() {
12761280 @ Override
12771281 public Consumer transformReply (AMQCommand replyCommand ) {
1278- ((Basic .CancelOk ) replyCommand .getMethod ()).getConsumerTag (); // just to make sure its the method expected
1282+ if (!(replyCommand .getMethod () instanceof Basic .CancelOk ))
1283+ LOGGER .warn ("Received reply was not of expected method Basic.CancelOk" );
12791284 _consumers .remove (consumerTag ); //may already have been removed
12801285 dispatcher .handleCancelOk (originalConsumer , consumerTag );
12811286 return originalConsumer ;
Original file line number Diff line number Diff line change @@ -805,7 +805,7 @@ void maybeDeleteRecordedAutoDeleteExchange(String exchange) {
805805 // last binding where this exchange is the source is gone, remove recorded exchange
806806 // if it is auto-deleted. See bug 26364.
807807 if ((x != null ) && x .isAutoDelete ()) {
808- deleteRecordedExchange (exchange );
808+ this . recordedExchanges . remove (exchange );
809809 }
810810 }
811811 }
You can’t perform that action at this time.
0 commit comments