diff --git a/service-providers/authenticator/src/mixnet_listener.rs b/service-providers/authenticator/src/mixnet_listener.rs index 256e4b2430..b3849d8190 100644 --- a/service-providers/authenticator/src/mixnet_listener.rs +++ b/service-providers/authenticator/src/mixnet_listener.rs @@ -122,10 +122,17 @@ impl MixnetListener { reg.gateway_data.private_ip )))?; - let timestamp = ip.ok_or(AuthenticatorError::InternalDataCorruption( - "timestamp should be set".to_string(), - ))?; - let duration = SystemTime::now().duration_since(timestamp).map_err(|_| { + let Some(timestamp) = ip else { + registred_and_free + .registration_in_progres + .remove(®.gateway_data.pub_key()); + log::debug!( + "Removed stale registration of {}", + reg.gateway_data.pub_key() + ); + continue; + }; + let duration = SystemTime::now().duration_since(*timestamp).map_err(|_| { AuthenticatorError::InternalDataCorruption( "set timestamp shouldn't have been set in the future".to_string(), )