We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 05a2434 + e171337 commit 96efb72Copy full SHA for 96efb72
1 file changed
src/main/java/com/emc/object/s3/LargeFileUploader.java
@@ -435,8 +435,11 @@ public void doMultipartUpload() {
435
try {
436
resumeContext.getUploadedParts().put(future.get().getPartNumber(), future.get());
437
} catch (ExecutionException e) { // unfortunately, we can't just catch CancellationException here
438
+ // get the root cause
439
+ Throwable t = e;
440
+ while (t.getCause() != null && t.getCause() != t) t = t.getCause();
441
// CancellationException is only thrown when we are terminated early - cancelled tasks will just be ignored
- if (e.getCause() == null || !(e.getCause() instanceof CancellationException)) throw e;
442
+ if (!(t instanceof CancellationException)) throw e;
443
}
444
445
0 commit comments