Skip to content

Commit

Permalink
Merge pull request #467 from bareos/dev/joergs/bareos-19.2/sd-droplet…
Browse files Browse the repository at this point in the history
…-exit-on-failure

chunked_device: bugfix WaitUntilChunksWritten() (bareos-19.2)
  • Loading branch information
franku committed Apr 6, 2020
2 parents aa8a359 + d1a0bd5 commit c7af75c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/src/stored/backends/chunked_device.cc
Expand Up @@ -1272,20 +1272,18 @@ bool chunked_device::is_written()
*/
bool chunked_device::WaitUntilChunksWritten()
{
bool retval = true;

if (current_chunk_->need_flushing) {
if (!FlushChunk(false /* release */, false /* move_to_next_chunk */)) {
dev_errno = EIO;
retval = false;
return false;
}
}

while (!is_written()) {
Bmicrosleep(DEFAULT_RECHECK_INTERVAL_WRITE_BUFFER, 0);
}

return retval;
return true;
}


Expand Down

0 comments on commit c7af75c

Please sign in to comment.