Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sdwoodbury committed Nov 9, 2023
1 parent 864cb89 commit 74221df
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions extensions/warp-blink-wrtc/src/blink_impl/gossipsub_sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,17 @@ async fn run(
},
GossipSubCmd::SendEcdh { dest, signal, topic } => {
// only add to the queue if sending fails
let encrypted = match ecdh_encrypt(&own_id, &dest, signal.clone()) {
Ok(r) => r,
Err(e) => {
log::error!("failed to encrypt ecdh message: {e}");
continue;
}
};
if ipfs.pubsub_publish(topic.clone(), encrypted).await.is_err() {
let queue = ecdh_queue.entry(dest.clone()).or_default();
queue.push_back(GossipSubCmd::SendEcdh { dest, signal, topic });
let encrypted = match ecdh_encrypt(&own_id, &dest, signal.clone()) {
Ok(r) => r,
Err(e) => {
log::error!("failed to encrypt ecdh message: {e}");
continue;
}
};
if ipfs.pubsub_publish(topic.clone(), encrypted).await.is_err() {
let queue = ecdh_queue.entry(dest.clone()).or_default();
queue.push_back(GossipSubCmd::SendEcdh { dest, signal, topic });
}
}
GossipSubCmd::Announce { group_key, signal, topic } => {
let encrypted = match Cipher::direct_encrypt(&signal, &group_key) {
Expand Down

0 comments on commit 74221df

Please sign in to comment.