mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
Failure in onComplete method of AbstractFsBlobContainer#readBlob should trigger onFailure
This commit is contained in:
parent
ab52ab48dd
commit
f9b43a9efa
@ -88,13 +88,17 @@ public abstract class AbstractFsBlobContainer extends AbstractBlobContainer {
|
||||
while ((bytesRead = is.read(buffer)) != -1) {
|
||||
listener.onPartial(buffer, 0, bytesRead);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
} catch (Throwable t) {
|
||||
IOUtils.closeWhileHandlingException(is);
|
||||
listener.onFailure(e);
|
||||
listener.onFailure(t);
|
||||
return;
|
||||
}
|
||||
IOUtils.closeWhileHandlingException(is);
|
||||
listener.onCompleted();
|
||||
try {
|
||||
IOUtils.closeWhileHandlingException(is);
|
||||
listener.onCompleted();
|
||||
} catch (Throwable t) {
|
||||
listener.onFailure(t);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user