Skip to content

Commit

Permalink
I'll generate a commit message for these changes:
Browse files Browse the repository at this point in the history
refactor: Fix ownership and cloning issues in FreenetApi synchronizer
  • Loading branch information
sanity committed Dec 25, 2024
1 parent d51387a commit 283e1da
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ui/src/components/app/freenet_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ impl FreenetApiSynchronizer {

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

let websocket_connection = match web_sys::WebSocket::new(WEBSOCKET_URL) {
Expand Down Expand Up @@ -88,7 +89,7 @@ impl FreenetApiSynchronizer {

// Watch for changes to Rooms signal
let rooms = use_context::<Signal<Rooms>>();
let request_sender_clone = request_sender.clone();
let request_sender = request_sender.clone();

use_effect(move || {
{
Expand Down

0 comments on commit 283e1da

Please sign in to comment.