Fix getSpasHeaders serviceName exception (#4883)

This commit is contained in:
杨翊 SionYang 2021-02-05 11:13:48 +08:00 committed by GitHub
parent ed0edaa023
commit 8dfaabdaf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -197,8 +197,8 @@ public class NamingGrpcClientProxy extends AbstractNamingClientProxy {
throws NacosException { throws NacosException {
try { try {
request.putAllHeader(getSecurityHeaders()); request.putAllHeader(getSecurityHeaders());
request.putAllHeader( request.putAllHeader(getSpasHeaders(
getSpasHeaders(NamingUtils.getGroupedName(request.getServiceName(), request.getGroupName()))); NamingUtils.getGroupedNameOptional(request.getServiceName(), request.getGroupName())));
Response response = Response response =
requestTimeout < 0 ? rpcClient.request(request) : rpcClient.request(request, requestTimeout); requestTimeout < 0 ? rpcClient.request(request) : rpcClient.request(request, requestTimeout);
if (ResponseCode.SUCCESS.getCode() != response.getResultCode()) { if (ResponseCode.SUCCESS.getCode() != response.getResultCode()) {