SecretStore: fixed test (#7878)
This commit is contained in:
parent
5584739b83
commit
ebb92947a3
@ -191,9 +191,9 @@ impl<T> SessionImpl<T> where T: SessionTransport {
|
|||||||
self.data.lock().continue_with = Some(action);
|
self.data.lock().continue_with = Some(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get continue action.
|
/// Take continue action.
|
||||||
pub fn continue_action(&self) -> Option<ContinueAction> {
|
pub fn take_continue_action(&self) -> Option<ContinueAction> {
|
||||||
self.data.lock().continue_with.clone()
|
self.data.lock().continue_with.take()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Wait for session completion.
|
/// Wait for session completion.
|
||||||
|
@ -471,7 +471,7 @@ impl ClusterCore {
|
|||||||
if is_master_node && session.is_finished() {
|
if is_master_node && session.is_finished() {
|
||||||
data.sessions.negotiation_sessions.remove(&session.id());
|
data.sessions.negotiation_sessions.remove(&session.id());
|
||||||
match session.wait() {
|
match session.wait() {
|
||||||
Ok((version, master)) => match session.continue_action() {
|
Ok((version, master)) => match session.take_continue_action() {
|
||||||
Some(ContinueAction::Decrypt(session, is_shadow_decryption)) => {
|
Some(ContinueAction::Decrypt(session, is_shadow_decryption)) => {
|
||||||
let initialization_error = if data.self_key_pair.public() == &master {
|
let initialization_error = if data.self_key_pair.public() == &master {
|
||||||
session.initialize(version, is_shadow_decryption, false)
|
session.initialize(version, is_shadow_decryption, false)
|
||||||
@ -498,7 +498,7 @@ impl ClusterCore {
|
|||||||
},
|
},
|
||||||
None => (),
|
None => (),
|
||||||
},
|
},
|
||||||
Err(error) => match session.continue_action() {
|
Err(error) => match session.take_continue_action() {
|
||||||
Some(ContinueAction::Decrypt(session, _)) => {
|
Some(ContinueAction::Decrypt(session, _)) => {
|
||||||
data.sessions.decryption_sessions.remove(&session.id());
|
data.sessions.decryption_sessions.remove(&session.id());
|
||||||
session.on_session_error(&meta.self_node_id, error);
|
session.on_session_error(&meta.self_node_id, error);
|
||||||
|
Loading…
Reference in New Issue
Block a user