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