Skip to content

Commit

Permalink
Remove extra flush when closing piped output stream
Browse files Browse the repository at this point in the history
  • Loading branch information
zhicwu committed May 10, 2022
1 parent 8eb0fa7 commit c3dbfe3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ public void close() throws IOException {
Thread.currentThread().interrupt();
throw new IOException("Thread was interrupted when putting EMPTY buffer into queue", e);
} finally {
super.close();
closed = true;
if (postCloseAction != null) {
postCloseAction.run();
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ public void close() throws IOException {
for (int i = 0, len = buckets.length; i < len; i++) {
buckets[i] = null;
}
super.close();

closed = true;
if (postCloseAction != null) {
postCloseAction.run();
}
}
}

Expand Down

0 comments on commit c3dbfe3

Please sign in to comment.