Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ChunkcedInputStream.close() wasn't closing the underlying stream
  • Loading branch information
kohsuke committed Jul 29, 2014
1 parent d1905ac commit fc5cf1a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/hudson/remoting/ChunkedInputStream.java
Expand Up @@ -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();
}
}
8 changes: 8 additions & 0 deletions src/main/java/hudson/remoting/ChunkedOutputStream.java
Expand Up @@ -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);
Expand Down

0 comments on commit fc5cf1a

Please sign in to comment.