Skip to content
Permalink
Browse files
[JENKINS-23248]
ChunkcedInputStream.close() wasn't closing the underlying stream
  • Loading branch information
kohsuke committed Jul 29, 2014
1 parent d1905ac commit fc5cf1a6a91d255333eff4ec936d55e5719e773c
Showing with 13 additions and 0 deletions.
  1. +5 −0 src/main/java/hudson/remoting/ChunkedInputStream.java
  2. +8 −0 src/main/java/hudson/remoting/ChunkedOutputStream.java
@@ -96,4 +96,9 @@ public void readUntilBreak(OutputStream sink) throws IOException {
return; // we've read the all payload of the last chunk
}
}

@Override
public void close() throws IOException {
base.close();
}
}
@@ -67,6 +67,14 @@ public void sendBreak() throws IOException {
base.flush();
}

@Override
public void flush() throws IOException {
if (size>0) {
sendFrame(true);
base.flush();
}
}

@Override
public void close() throws IOException {
sendFrame(false);

0 comments on commit fc5cf1a

Please sign in to comment.