Fix exception code error.(#10925) (#10926)

This commit is contained in:
阿魁 2023-08-10 11:07:47 +08:00 committed by GitHub
parent 03f2191ff4
commit 86cf2082a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -716,7 +716,7 @@ public abstract class RpcClient implements Closeable {
try {
if (this.currentConnection == null || !isRunning()) {
waitReconnect = true;
throw new NacosException(NacosException.CLIENT_INVALID_PARAM, "Client not connected.");
throw new NacosException(NacosException.CLIENT_DISCONNECT, "Client not connected.");
}
this.currentConnection.asyncRequest(request, callback);
return;
@ -766,7 +766,7 @@ public abstract class RpcClient implements Closeable {
try {
if (this.currentConnection == null || !isRunning()) {
waitReconnect = true;
throw new NacosException(NacosException.CLIENT_INVALID_PARAM, "Client not connected.");
throw new NacosException(NacosException.CLIENT_DISCONNECT, "Client not connected.");
}
return this.currentConnection.requestFuture(request);
} catch (Exception e) {