From 9449100757e8d9cd37944bde48b89616db20bf03 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sat, 10 Oct 2020 01:06:54 -0700 Subject: [PATCH] adjust throwing exception --- .../client/src/main/java/seaweedfs/client/SeaweedRead.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java b/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java index 0e8919d06..ab2407dec 100644 --- a/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java +++ b/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java @@ -104,6 +104,7 @@ public class SeaweedRead { String url = String.format("http://%s/%s", location.getUrl(), chunkView.fileId); try { data = doFetchOneFullChunkData(chunkView, url); + lastException = null; break; } catch (IOException ioe) { LOG.debug("doFetchFullChunkData {} :{}", url, ioe); @@ -119,7 +120,7 @@ public class SeaweedRead { } } - if (data == null && lastException != null) { + if (lastException != null) { throw lastException; }