Properly close/flush TransportOutputStream.
Resolves #1206,#1207.
This commit is contained in:
committed by
Greg L. Turnquist
parent
ec8800138f
commit
aefa4e4de6
@@ -47,7 +47,9 @@ public abstract class TransportInputStream extends InputStream {
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
getInputStream().close();
|
||||
if (inputStream != null) {
|
||||
getInputStream().close();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,12 +45,16 @@ public abstract class TransportOutputStream extends OutputStream {
|
||||
|
||||
@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
|
||||
|
||||
Reference in New Issue
Block a user