Skip to content

Commit

Permalink
fix(iroh-blobs): Timeout based on correct max_write_duration option (
Browse files Browse the repository at this point in the history
…#2688)

## Description

This fixes a small copy and paste bug that was introduced in #2622,
here:
https://github.com/n0-computer/iroh/pull/2622/files?diff=unified&w=0#diff-bbe46ca272a808bb1c94619ab3264586a47a6ec6e0f7cd5a63dba5e99099241bL1521-R1526
(You need to load the diff for the `fs.rs` file)
<!-- A summary of what this pull request achieves and a rough list of
changes. -->

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
None

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->
Tests would be nice, but I'm looking at other things right now, so I'd
prefer to merge this first :S

## Change checklist

- [x] Self-review.
- ~~[ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.~~
- ~~[ ] Tests if relevant.~~
- [x] All breaking changes documented.
  • Loading branch information
matheus23 authored Sep 2, 2024
1 parent 5bbcb60 commit 2347565
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iroh-blobs/src/store/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,7 @@ impl Actor {
let mut delete_after_commit = Default::default();
let mut tables = Tables::new(&txn, &mut delete_after_commit)?;
let count = self.state.options.batch.max_write_batch;
let timeout = tokio::time::sleep(self.state.options.batch.max_read_duration);
let timeout = tokio::time::sleep(self.state.options.batch.max_write_duration);
tokio::pin!(timeout);
for _ in 0..count {
tokio::select! {
Expand Down

0 comments on commit 2347565

Please sign in to comment.