3

`remove_address_record` function is called two times per Address during Processo...

 7 months ago
source link: https://github.com/build-trust/ockam/issues/7401
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Member

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK