Skip to content
Snippets Groups Projects
Unverified Commit 2f894b9b authored by Bogdan-Ștefan Neacşu's avatar Bogdan-Ștefan Neacşu Committed by GitHub
Browse files

Remove race on initial req processing (#5001)

parent 18c6fd3e
Branches
Tags
No related merge requests found
......@@ -152,10 +152,8 @@ impl<S: Storage + Clone + 'static> MixnetListener<S> {
) -> AuthenticatorHandleResult {
let remote_public = init_message.pub_key;
let nonce: u64 = fastrand::u64(..);
if let Some(registration_data) = self
.registred_and_free
.read()
.await
let mut registred_and_free = self.registred_and_free.write().await;
if let Some(registration_data) = registred_and_free
.registration_in_progres
.get(&remote_public)
{
......@@ -184,7 +182,6 @@ impl<S: Storage + Clone + 'static> MixnetListener<S> {
));
}
let mut registred_and_free = self.registred_and_free.write().await;
let private_ip_ref = registred_and_free
.free_private_network_ips
.iter_mut()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment