Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

Commit

Permalink
Ignore exceptions when shutting down input / output in close
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault committed Dec 14, 2021
1 parent 192189b commit e5fbfdc
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,16 @@ private void doShutdown(int how) throws IOException {
}

public void close() throws IOException {
shutdownInput();
shutdownOutput();
try {
shutdownInput();
} catch (IOException ex) {
// ignored
}
try {
shutdownOutput();
} catch (IOException ex) {
// ignored
}
super.close();
// This might not close the FD right away. In case we are about
// to read or write on another thread, it will delay the close
Expand Down

0 comments on commit e5fbfdc

Please sign in to comment.