crypto: Only go into a done verification request if we're in the correct state

master
Damir Jelić 2021-07-09 11:50:12 +02:00
parent 76d57baa11
commit 4e5cc03673
1 changed files with 4 additions and 4 deletions

View File

@ -521,12 +521,12 @@ impl InnerRequest {
fn receive_done(&mut self, content: &DoneContent) { fn receive_done(&mut self, content: &DoneContent) {
*self = InnerRequest::Done(match self { *self = InnerRequest::Done(match self {
InnerRequest::Created(s) => s.clone().into_done(content),
InnerRequest::Requested(s) => s.clone().into_done(content),
InnerRequest::Ready(s) => s.clone().into_done(content), InnerRequest::Ready(s) => s.clone().into_done(content),
InnerRequest::Passive(s) => s.clone().into_done(content), InnerRequest::Passive(s) => s.clone().into_done(content),
InnerRequest::Done(s) => s.clone().into_done(content), InnerRequest::Done(_)
InnerRequest::Cancelled(_) => return, | InnerRequest::Created(_)
| InnerRequest::Requested(_)
| InnerRequest::Cancelled(_) => return,
}) })
} }