fixed asymmetry between add and remove
This commit is contained in:
parent
ca95791d2e
commit
718b2c793d
|
@ -56,7 +56,11 @@ public class SubscriptionChannelRegistry {
|
|||
}
|
||||
|
||||
public void remove(ActiveSubscription theActiveSubscription) {
|
||||
if (!myModelConfig.isSubscriptionMatchingEnabled()) {
|
||||
return;
|
||||
}
|
||||
String channelName = theActiveSubscription.getChannelName();
|
||||
ourLog.info("Removing subscription {} from channel {}", theActiveSubscription.getId() ,channelName);
|
||||
boolean removed = myActiveSubscriptionByChannelName.remove(channelName, theActiveSubscription.getId());
|
||||
if (!removed) {
|
||||
ourLog.warn("Failed to remove subscription {} from channel {}", theActiveSubscription.getId() ,channelName);
|
||||
|
@ -82,7 +86,7 @@ public class SubscriptionChannelRegistry {
|
|||
|
||||
@VisibleForTesting
|
||||
public void logForUnitTest() {
|
||||
ourLog.info("Channels: {}", size());
|
||||
ourLog.info("{} Channels: {}", this, size());
|
||||
for (String key : myActiveSubscriptionByChannelName.keySet()) {
|
||||
Collection<String> list = myActiveSubscriptionByChannelName.get(key);
|
||||
for (String value : list) {
|
||||
|
|
Loading…
Reference in New Issue