Skip to content

Commit

Permalink
spring-projects#1206 fixed close() and flush() at TransportOutputStre…
Browse files Browse the repository at this point in the history
…am and

TransportInputStream
  • Loading branch information
leaqui committed Jul 31, 2021
1 parent fa76440 commit adbd625
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ private InputStream getInputStream() throws IOException {

@Override
public void close() throws IOException {
getInputStream().close();
if (inputStream != null) {
getInputStream().close();
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,16 @@ private OutputStream getOutputStream() throws IOException {

@Override
public void close() throws IOException {
getOutputStream().close();
if (outputStream != null) {
getOutputStream().close();
}
}

@Override
public void flush() throws IOException {
getOutputStream().flush();
if (outputStream != null) {
getOutputStream().flush();
}
}

@Override
Expand Down

0 comments on commit adbd625

Please sign in to comment.