Skip to content

Commit

Permalink
fix ipfs kad example & bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
leonzchang committed Oct 16, 2023
1 parent 43c4efa commit 864943a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/ipfs-kad/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ipfs-kad-example"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
publish = false
license = "MIT"
Expand Down
3 changes: 3 additions & 0 deletions examples/ipfs-kad/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ async fn main() -> Result<()> {
let store = kad::store::MemoryStore::new(key.public().to_peer_id());
kad::Behaviour::with_config(key.public().to_peer_id(), store, cfg)
})?
.with_swarm_config(|config| {
config.with_idle_connection_timeout(Duration::from_secs(60 * 5))
})
.build();

// Add the bootnodes to the local routing table. `libp2p-dns` built
Expand Down

0 comments on commit 864943a

Please sign in to comment.