Skip to content

ISSUE-320 PrepareConfHandler: merge token and confToken variables #321

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
@@ -61,7 +61,6 @@ protected void channelRead0(ChannelHandlerContext ctx, A6Request request) {
Req req = ((A6ConfigRequest) request).getReq();
long confToken = ThreadLocalRandom.current().nextInt(Integer.MAX_VALUE);
A6Response response = new A6ConfigResponse(confToken);
long token = ((A6ConfigResponse) response).getConfToken();
PluginFilterChain chain = createFilterChain(req);

/*
@@ -76,9 +75,9 @@ protected void channelRead0(ChannelHandlerContext ctx, A6Request request) {
config.put(conf.name(), conf.value());
}
A6Conf a6Conf = new A6Conf(config, chain);
cache.put(token, a6Conf);
cache.put(confToken, a6Conf);
for (A6ConfigWatcher watcher : watchers) {
watcher.watch(token, a6Conf);
watcher.watch(confToken, a6Conf);
}
ctx.write(response);
ctx.writeAndFlush(response);