Skip to content

Commit

Permalink
remove callback ref
Browse files Browse the repository at this point in the history
  • Loading branch information
BillCarsonFr committed Oct 5, 2023
1 parent d4ff968 commit 9fb1f2a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1116,11 +1116,10 @@ impl OlmMachine {
let store_weak = Arc::downgrade(&store);
// fire up a promise chain which will call `cb` on each result from the stream
spawn_local(async move {
let callback_ref = &callback;
// Pin the stream to ensure it can be safely moved across threads
pin_mut!(stream);
while let Some(secret) = stream.next().await {
send_secret_gossip_to_callback(callback_ref, &secret).await;
send_secret_gossip_to_callback(&callback, &secret).await;
if let Some(store) = store_weak.upgrade() {
match store.delete_secrets_from_inbox(&secret.secret_name).await {
Ok(_) => (),
Expand Down

0 comments on commit 9fb1f2a

Please sign in to comment.