Skip to content

SPR-15543: Fix duplicate subscriptionId for destination-sessionId key #1427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,10 @@ public void updateAfterNewSubscription(String destination, String sessionId, Str
String cachedDestination = entry.getKey();
if (getPathMatcher().match(destination, cachedDestination)) {
LinkedMultiValueMap<String, String> subs = entry.getValue();
subs.add(sessionId, subsId);
this.accessCache.put(cachedDestination, subs.deepCopy());
if (!subs.containsKey(sessionId) || !subs.get(sessionId).contains(subsId)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在这里加了一个判断,表示没看懂为什么要加这个判断

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, thanks for catching this. Fixed!

subs.add(sessionId, subsId);
this.accessCache.put(cachedDestination, subs.deepCopy());
}
}
}
}
Expand Down