Skip to content

Commit

Permalink
fix(image_loader): Add requester to the list
Browse files Browse the repository at this point in the history
When an image was being loaded in the background and a new requester
came in, it was not added to the list, causing the image to be loaded
each time from scratch.
  • Loading branch information
danyspin97 committed Nov 18, 2024
1 parent 402e111 commit 7c16be1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions daemon/src/image_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ impl ImageLoader {
// the thread is still running
// reassign the handle
image.thread_handle = Some(handle);
// if this is a new requester, add it to the list
if !image.requesters.contains(&requester_name) {
image.requesters.push(requester_name);
}
return ImageLoaderStatus::Waiting;
}
}
Expand Down

0 comments on commit 7c16be1

Please sign in to comment.