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 {
try {
request.putAllHeader(getSecurityHeaders());
request.putAllHeader(
getSpasHeaders(NamingUtils.getGroupedName(request.getServiceName(), request.getGroupName())));
request.putAllHeader(getSpasHeaders(
NamingUtils.getGroupedNameOptional(request.getServiceName(), request.getGroupName())));
Response response =
requestTimeout < 0 ? rpcClient.request(request) : rpcClient.request(request, requestTimeout);
if (ResponseCode.SUCCESS.getCode() != response.getResultCode()) {