xds: fix bug of return resolution error twice in xDS resolver (#6671)

This commit is contained in:
Chengyuan Zhang 2020-02-11 09:48:53 -08:00 committed by GitHub
parent 255e5feb24
commit 043ab93b3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -178,8 +178,9 @@ final class XdsNameResolver extends NameResolver {
// a temporary solution. More design discussion needs to be done.
if (error.getCode().equals(Code.NOT_FOUND)) {
listener.onResult(ResolutionResult.newBuilder().build());
return;
}
listener.onError(error);
listener.onError(Status.UNAVAILABLE.withDescription(error.getDescription()));
}
});
}