Skip to content

Commit

Permalink
feat: Fix ownership issue with request_sender in FreenetApiSynchronizer
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Dec 25, 2024
1 parent 666c6b6 commit 2b808a1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ui/src/components/app/freenet_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,10 @@ impl FreenetApiSynchronizer {
pub fn start() -> Self {
let subscribed_contracts = HashSet::new();
let (request_sender, _request_receiver) = futures::channel::mpsc::unbounded();
let request_sender_for_api = request_sender.clone();

let _sender = FreenetApiSender { request_sender: request_sender.clone() };
let sender_for_struct = request_sender.clone();

// Start the sync coroutine
use_coroutine(move |mut rx| {
let request_sender = request_sender.clone();
async move {
*SYNC_STATUS.write() = SyncStatus::Connecting;

Expand Down Expand Up @@ -194,7 +191,7 @@ impl FreenetApiSynchronizer {
|| {},
),
subscribed_contracts,
sender: FreenetApiSender { request_sender },
sender: FreenetApiSender { request_sender: sender_for_struct },
}
}

Expand Down

0 comments on commit 2b808a1

Please sign in to comment.