Skip to content

Commit

Permalink
fixup optimistic flush
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Jun 27, 2024
1 parent 1d2c998 commit a3080b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pread_disk_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1472,8 +1472,9 @@ void pread_disk_io::thread_fun(aux::disk_io_thread_pool& pool

auto* j = static_cast<aux::pread_disk_job*>(pool.pop_front());

if (&pool == &m_generic_threads)
if (&pool == &m_generic_threads || (j->flags & disk_interface::flush_piece))
{
DLOG("optimistic flush\n");
// This will attempt to flush any pieces that have been completely
// downloaded
try_flush_cache(int(m_cache.size()), l);
Expand Down

0 comments on commit a3080b8

Please sign in to comment.