Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.

remove the default random listening address #383

Merged
merged 3 commits into from
Sep 22, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/p2p/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,10 @@ pub async fn create_swarm<TIpfsTypes: IpfsTypes>(
let behaviour = behaviour::build_behaviour(options, ipfs).await;

// Create a Swarm
let mut swarm = libp2p::swarm::SwarmBuilder::new(transport, behaviour, peer_id)
let swarm = libp2p::swarm::SwarmBuilder::new(transport, behaviour, peer_id)
.executor(Box::new(SpannedExecutor(swarm_span)))
.build();

// Listen on all interfaces and whatever port the OS assigns
Swarm::listen_on(&mut swarm, "/ip4/127.0.0.1/tcp/0".parse().unwrap()).unwrap();

Ok(swarm)
}

Expand Down