monkeyDluffy6017 commented on code in PR #10278:
URL: https://github.com/apache/apisix/pull/10278#discussion_r1349450629
##########
apisix/discovery/consul/init.lua:
##########
@@ -197,21 +197,22 @@ local function get_opts(consul_server, is_catalog)
port = consul_server.port,
connect_timeout = consul_server.connect_timeout,
read_timeout = consul_server.read_timeout,
+ default_args = {
+ token = consul_server.token,
+ }
}
if not consul_server.keepalive then
return opts
end
if is_catalog then
- opts.default_args = {
- wait = consul_server.wait_timeout, --blocked wait!=0; unblocked by
wait=0
- index = consul_server.catalog_index,
- }
+ opts.default_args.wait = consul_server.wait_timeout --blocked wait!=0;
unblocked by wait=0
+ opts.default_args.index = consul_server.catalog_index
+ opts.default_args.token = consul_server.token
Review Comment:
Why do you add `opts.default_args.token = consul_server.token` again, you
have done this at line 200 ~ 202.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]