File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
fluss-rpc/src/main/java/com/alibaba/fluss/rpc/netty/client Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -327,8 +327,15 @@ private CompletableFuture<ApiMessage> doSend(
327327 if (!future .isSuccess ()) {
328328 connectionMetricGroup .updateMetricsAfterGetResponse (
329329 apiKey , inflight .requestStartTime , 0 );
330- inflight .responseFuture .completeExceptionally (
331- future .cause ());
330+ Throwable cause = future .cause ();
331+ if (cause instanceof IOException ) {
332+ // when server close the channel, the cause will be
333+ // IOException, if the cause is IOException, we wrap
334+ // it as retryable NetworkException to retry to
335+ // connect
336+ cause = new NetworkException (cause );
337+ }
338+ inflight .responseFuture .completeExceptionally (cause );
332339 inflightRequests .remove (inflight .requestId );
333340 }
334341 });
You can’t perform that action at this time.
0 commit comments