Browse Source

adjust throwing exception

pull/1524/head
Chris Lu 4 years ago
parent
commit
9449100757
  1. 3
      other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java

3
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); String url = String.format("http://%s/%s", location.getUrl(), chunkView.fileId);
try { try {
data = doFetchOneFullChunkData(chunkView, url); data = doFetchOneFullChunkData(chunkView, url);
lastException = null;
break; break;
} catch (IOException ioe) { } catch (IOException ioe) {
LOG.debug("doFetchFullChunkData {} :{}", url, ioe); LOG.debug("doFetchFullChunkData {} :{}", url, ioe);
@ -119,7 +120,7 @@ public class SeaweedRead {
} }
} }
if (data == null && lastException != null) {
if (lastException != null) {
throw lastException; throw lastException;
} }

Loading…
Cancel
Save