Skip to content

Commit 8429e8c

Browse files
committed
fix: ping tutorial - 10s default timeout
1 parent 6742553 commit 8429e8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libp2p/src/tutorials/ping.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,12 @@
205205
//! ## Idle connection timeout
206206
//!
207207
//! Now, for this example in particular, we need set the idle connection timeout.
208-
//! Otherwise, the connection will be closed immediately.
208+
//! The default connection timeout is 10 seconds.
209209
//!
210210
//! Whether you need to set this in your application too depends on your usecase.
211211
//! Typically, connections are kept alive if they are "in use" by a certain protocol.
212212
//! The ping protocol however is only an "auxiliary" kind of protocol.
213-
//! Thus, without any other behaviour in place, we would not be able to observe the pings.
213+
//! Thus, without any other behaviour in place, we would not be able to observe any pings after 10s.
214214
//!
215215
//! ```rust
216216
//! use std::{error::Error, time::Duration};

0 commit comments

Comments
 (0)