commit | a6c858bb541c371bf5530d9caebf31a0b59fb0e9 | [log] [tgz] |
---|---|---|
author | Michael Blow <mblow@apache.org> | Sat Feb 12 08:45:40 2022 -0500 |
committer | Michael Blow <mblow@apache.org> | Mon Feb 14 20:47:42 2022 +0000 |
tree | 50b3ddf7f27f5d5a460d22794cfb4f021a7d9d70 | |
parent | ef3da66b3fa444e3f44e6c7c2b6d9e309e885492 [diff] |
[NO ISSUE][HTTP] Fork the close of response stream on interrupt Change-Id: I0a49ae5b1d3d59f68e769bef45c39e0242e312bc Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/15243 Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Reviewed-by: Michael Blow <mblow@apache.org> Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com> Tested-by: Michael Blow <mblow@apache.org>
diff --git a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/utils/HttpUtil.java b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/utils/HttpUtil.java index e433c02..9f01123 100644 --- a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/utils/HttpUtil.java +++ b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/utils/HttpUtil.java
@@ -236,7 +236,13 @@ try { return readFuture.get(); } catch (InterruptedException ex) { // NOSONAR -- interrupt or rethrow - response.close(); + executor.submit(() -> { + try { + response.close(); + } catch (IOException e) { + LOGGER.debug("{} ignoring exception thrown on stream close due to interrupt", description, e); + } + }); try { readFuture.get(1, TimeUnit.SECONDS); } catch (TimeoutException te) {