Skip to content

Commit

Permalink
Add flush after copy during downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
sswguo committed Sep 5, 2024
1 parent 9d08a46 commit 8a9396c
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public void write( final OutputStream out )
{
CountingOutputStream cout = new CountingOutputStream( out );
IOUtils.copy( stream, cout );
cout.flush(); // ensure any remaining data is written to the output stream

Logger logger = LoggerFactory.getLogger( getClass() );
logger.trace( "Wrote: {} bytes", cout.getByteCount() );
Expand Down

0 comments on commit 8a9396c

Please sign in to comment.