Skip to content

Commit

Permalink
Merge pull request #2460 from sswguo/tryfix_downloads
Browse files Browse the repository at this point in the history
Add flush after copy during downloads
  • Loading branch information
sswguo authored Dec 2, 2024
2 parents 2c86c45 + 8a9396c commit 16f1016
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 16f1016

Please sign in to comment.