Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

SecretStore: fixed test #7878

Merged
merged 1 commit into from
Feb 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ impl<T> SessionImpl<T> where T: SessionTransport {
self.data.lock().continue_with = Some(action);
}

/// Get continue action.
pub fn continue_action(&self) -> Option<ContinueAction> {
self.data.lock().continue_with.clone()
/// Take continue action.
pub fn take_continue_action(&self) -> Option<ContinueAction> {
self.data.lock().continue_with.take()
}

/// Wait for session completion.
Expand Down
4 changes: 2 additions & 2 deletions secret_store/src/key_server_cluster/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ impl ClusterCore {
if is_master_node && session.is_finished() {
data.sessions.negotiation_sessions.remove(&session.id());
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)) => {
let initialization_error = if data.self_key_pair.public() == &master {
session.initialize(version, is_shadow_decryption, false)
Expand All @@ -498,7 +498,7 @@ impl ClusterCore {
},
None => (),
},
Err(error) => match session.continue_action() {
Err(error) => match session.take_continue_action() {
Some(ContinueAction::Decrypt(session, _)) => {
data.sessions.decryption_sessions.remove(&session.id());
session.on_session_error(&meta.self_node_id, error);
Expand Down