ockam
ockam copied to clipboard
`remove_address_record` function is called two times per Address during Processor shutdown
Observed behavior
remove_address_record
is called two times for the same Address
Steps to reproduce
use core::time::Duration;
use ockam_core::async_trait;
use ockam_core::{Processor, Result};
use ockam_node::Context;
#[ockam_macros::test]
async fn starting_processor(ctx: &mut Context) -> Result<()> {
ctx.start_processor("dummy_processor", DummyProcessor)
.await?;
ctx.sleep(Duration::from_secs(1)).await;
ctx.stop_processor("dummy_processor").await?;
ctx.sleep(Duration::from_secs(1)).await;
ctx.stop().await
}
struct DummyProcessor;
#[async_trait]
impl Processor for DummyProcessor {
type Context = Context;
async fn process(&mut self, _ctx: &mut Context) -> Result<bool> {
Ok(true)
}
}
Desired behavior
Each address should in the system should have clear lifecycle. It should be removed only once
Ockam Version
0.116.0
Hello can I work for it?
But I need to know where is relevant code located @SanjoDeundiak
Sure @danik292 , go ahead! Most of the source code you'll need to touch must be in ockam_node/src/router
directory. The tricky part of that issue is that access to the address map happens from different places/different source files/at different point of an address lifecycle. So could take a while to untangle
Thank you☺️ @SanjoDeundiak