Skip to content

After shutting down iroh, when recreating iroh-doc and joining nodes using tickets, it shows “Lost connection to relay server.” #74

@appeathoul

Description

@appeathoul

The issue reproduces when I shutdown an existing router, recreate it, and rejoin it with a remote ticket

it shows “Lost connection to relay server.”

Could cause synchronization data failure
#51

Thank you very much. Could you provide a solution?

env

iroh v0.94.0
iroh-gossip v0.94.0
iroh-blobs v0.94.0
iroh-doc v0.94.0

let client_path = client_src.to_string_lossy().into_owned();
let client_path1 = client_src1.to_string_lossy().into_owned();

// If you want to restart the client with a new connection, uncomment the following lines to stop the previous instance
// But it cause some issue
// ------------------------

let iroh_net = start_server(iroh_secret_key.clone(), client_path.clone()).await?;

iroh_net.router.shutdown().await?;
sleep(Duration::from_secs(1)).await;

let iroh_net1 = start_server(iroh_secret_key, client_path1).await?;

let mut tickets = std::collections::HashMap::new();
tickets.insert("node".to_string(), node_ticket.parse()?);
tickets.insert("folder".to_string(), folder_ticket.parse()?);
tickets.insert("resource".to_string(), resource_ticket.parse()?);
tickets.insert("resource1".to_string(), resource_ticket1.parse()?);
tickets.insert("resource2".to_string(), resource_ticket2.parse()?);
tickets.insert("resource3".to_string(), resource_ticket3.parse()?);
let store_state = create_files(&iroh_net1, Some(tickets)).await?;

I have uploaded a test project and upgrade V0.94.0
iroh-test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions