From 6f01731e8a81024c70aef25db57e6ec40e1f667c Mon Sep 17 00:00:00 2001 From: Darius Date: Fri, 27 Oct 2023 13:09:49 -0400 Subject: [PATCH] chore: Remove spawned task --- extensions/warp-ipfs/src/store/message.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/extensions/warp-ipfs/src/store/message.rs b/extensions/warp-ipfs/src/store/message.rs index db769b967..685a213c3 100644 --- a/extensions/warp-ipfs/src/store/message.rs +++ b/extensions/warp-ipfs/src/store/message.rs @@ -1154,15 +1154,9 @@ impl MessageStore { document.signature = Some(signature); self.conversations.set(document).await?; - tokio::spawn({ - let store = self.clone(); - let recipient = recipient.clone(); - async move { - if let Err(e) = store.request_key(conversation_id, &recipient).await { - error!("Error requesting key: {e}"); - } - } - }); + if let Err(e) = self.request_key(conversation_id, &recipient).await { + error!("Error requesting key: {e}"); + } if let Err(e) = tx.send(MessageEventKind::RecipientAdded { conversation_id,