Skip to content

Commit

Permalink
Add comment to explain decision tree
Browse files Browse the repository at this point in the history
References #525

(cherry picked from commit ad69686)
  • Loading branch information
acogoluegnes committed Mar 22, 2019
1 parent 365dd22 commit e49f66d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/rabbitmq/client/impl/ChannelN.java
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ private void releaseChannel() {
Basic.Cancel m = (Basic.Cancel)method;
String consumerTag = m.getConsumerTag();
Consumer callback = _consumers.remove(consumerTag);
// Not finding any matching consumer isn't necessarily an indication of an issue anywhere.
// Sometimes there's a natural race condition between consumer management on the server and client ends.
// E.g. Channel#basicCancel called just before a basic.cancel for the same consumer tag is received.
// See https://github.com/rabbitmq/rabbitmq-java-client/issues/525
if (callback == null) {
callback = defaultConsumer;
}
Expand Down

0 comments on commit e49f66d

Please sign in to comment.