Skip to content

Commit

Permalink
remove unwrap from VcRequestSender (#2687)
Browse files Browse the repository at this point in the history
  • Loading branch information
kziemianek committed Apr 25, 2024
1 parent 22f3547 commit f872bf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tee-worker/litentry/core/vc-task/sender/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ impl VcRequestSender {
debug!("send vc request: {:?}", request);

// Acquire lock on extrinsic sender
let mutex_guard = GLOBAL_VC_TASK_SENDER.lock().unwrap();
let vc_task_sender = mutex_guard.clone().unwrap();
let mutex_guard = GLOBAL_VC_TASK_SENDER.lock().map_err(|_| "Could not access Mutex")?;
let vc_task_sender = mutex_guard.clone().ok_or("Daemon sender was not initialized")?;
// Release mutex lock, so we don't block the lock longer than necessary.
drop(mutex_guard);

Expand Down

0 comments on commit f872bf2

Please sign in to comment.