Skip to content

Commit

Permalink
Merge branch 'main' into feat-disable-docs-by-default
Browse files Browse the repository at this point in the history
  • Loading branch information
ramfox authored Sep 26, 2024
2 parents d073f0c + 857e513 commit 8f4ee51
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
5 changes: 3 additions & 2 deletions iroh-blobs/src/downloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,6 @@ impl<G: Getter<Connection = D::Connection>, D: Dialer> Service<G, D> {
entry.get_mut().intents.insert(intent_id, intent_handlers);
}
hash_map::Entry::Vacant(entry) => {
tracing::warn!("is new, queue");
let progress_sender = self.progress_tracker.track(
kind,
intent_handlers
Expand All @@ -728,7 +727,9 @@ impl<G: Getter<Connection = D::Connection>, D: Dialer> Service<G, D> {
);

let get_state = match self.getter.get(kind, progress_sender.clone()).await {
Err(_err) => {
Err(err) => {
// This prints a "FailureAction" which is somewhat weird, but that's all we get here.
tracing::error!(?err, "failed queuing new download");
self.finalize_download(
kind,
[(intent_id, intent_handlers)].into(),
Expand Down
3 changes: 0 additions & 3 deletions iroh-blobs/src/downloader/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ struct Inner {

impl Inner {
fn subscribe(&mut self, subscriber: ProgressSubscriber) -> DownloadProgress {
tracing::warn!(state=?self.state, "subscribe! emit initial");
let msg = DownloadProgress::InitialState(self.state.clone());
self.subscribers.push(subscriber);
msg
Expand Down Expand Up @@ -137,9 +136,7 @@ impl ProgressSender for BroadcastProgressSender {
// making sure that the lock is not held across an await point.
let futs = {
let mut inner = self.shared.lock();
tracing::trace!(?msg, state_pre = ?inner.state, "send to {}", inner.subscribers.len());
inner.on_progress(msg.clone());
tracing::trace!(state_post = ?inner.state, "send");
let futs = inner
.subscribers
.iter_mut()
Expand Down
2 changes: 1 addition & 1 deletion iroh-blobs/src/get/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ pub enum DownloadProgress {
/// The offset of the progress, in bytes.
offset: u64,
},
/// We are done with `id`, and the hash is `hash`.
/// We are done with `id`.
Done {
/// The unique id of the entry.
id: u64,
Expand Down
2 changes: 1 addition & 1 deletion iroh-blobs/src/get/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl TransferState {
warn!(%id, "Received `Done` event for unknown progress id.")
}
}
_ => {}
DownloadProgress::AllDone(_) | DownloadProgress::Abort(_) => {}
}
}
}

0 comments on commit 8f4ee51

Please sign in to comment.