Skip to content

Commit be9ac38

Browse files
committed
Close delegate InputStream
1 parent fe15b12 commit be9ac38

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

modules/repository-url/src/main/java/org/elasticsearch/common/blobstore/url/HttpURLBlobContainer.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,5 +188,12 @@ private void maybeOpenInputStream() throws IOException {
188188
delegate = getInputStream(blobName, Math.addExact(initialOffset, totalBytesRead), end);
189189
}
190190
}
191+
192+
@Override
193+
public void close() throws IOException {
194+
if (delegate != null) {
195+
delegate.close();
196+
}
197+
}
191198
}
192199
}

0 commit comments

Comments
 (0)