crypto: Don't await while holding a sync lock
parent
12619ab8b3
commit
8a5a0e511e
|
@ -389,7 +389,9 @@ impl VerificationRequest {
|
|||
) -> Result<(), CryptoStoreError> {
|
||||
let content = content.into();
|
||||
|
||||
if let InnerRequest::Ready(s) = &*self.inner.lock().unwrap() {
|
||||
let inner = self.inner.lock().unwrap().clone();
|
||||
|
||||
if let InnerRequest::Ready(s) = inner {
|
||||
s.receive_start(sender, content).await?;
|
||||
} else {
|
||||
warn!(
|
||||
|
@ -433,7 +435,7 @@ impl VerificationRequest {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Clone, Debug)]
|
||||
enum InnerRequest {
|
||||
Created(RequestState<Created>),
|
||||
Requested(RequestState<Requested>),
|
||||
|
|
Loading…
Reference in New Issue