Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public void onComplete(final TPipeTransferResp response) {
public void onError(final Exception exception) {
if (client != null) {
ThriftClient.resolveException(exception, client);
client.setPrintLogWhenEncounterException(false);
}

if (connector.isClosed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class AsyncPipeDataTransferServiceClient extends IClientRPCService.AsyncC
private static final AtomicInteger idGenerator = new AtomicInteger(0);
private final int id = idGenerator.incrementAndGet();

private final boolean printLogWhenEncounterException;
private boolean printLogWhenEncounterException;

private final TEndPoint endpoint;
private final ClientManager<TEndPoint, AsyncPipeDataTransferServiceClient> clientManager;
Expand Down Expand Up @@ -85,6 +85,7 @@ public void onComplete() {
public void onError(final Exception e) {
super.onError(e);
ThriftClient.resolveException(e, this);
setPrintLogWhenEncounterException(false);
returnSelf(
(i) -> i instanceof IllegalStateException && "Client has an error!".equals(i.getMessage()));
}
Expand All @@ -106,6 +107,10 @@ public boolean printLogWhenEncounterException() {
return printLogWhenEncounterException;
}

public void setPrintLogWhenEncounterException(final boolean printLogWhenEncounterException) {
this.printLogWhenEncounterException = printLogWhenEncounterException;
}

/**
* return self, the method doesn't need to be called by the user and will be triggered after the
* RPC is finished.
Expand Down