Skip to content

Commit aad3826

Browse files
Chris Connellyconnec
Chris Connelly
authored andcommitted
refactor!: don't specify keep-alive-interval by default
This removes the `--keep-alive-interval-msec` flag from the default flags passed to `sn_node` by making it optional, and defaulting to unset. BREAKING CHANGE: The default value for `--keep-alive-interval-msec` if unspecified has changed to `None`, which will not pass any flag to `sn_node`, meaning the upstream default will apply.
1 parent fb25b5c commit aad3826

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/lib.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ pub struct Launch {
5555
idle_timeout_msec: u64,
5656

5757
/// Interval in seconds between qp2p keep alive messages
58-
#[structopt(long = "keep-alive-interval-msec", default_value = "4000")]
59-
keep_alive_interval_msec: u64,
58+
#[structopt(long = "keep-alive-interval-msec")]
59+
keep_alive_interval_msec: Option<u64>,
6060

6161
/// Path where the output directories for all the nodes are written
6262
#[structopt(short = "d", long, default_value = "./nodes")]
@@ -86,8 +86,11 @@ impl Launch {
8686

8787
node_cmd.push_arg("--idle-timeout-msec");
8888
node_cmd.push_arg(self.idle_timeout_msec.to_string());
89-
node_cmd.push_arg("--keep-alive-interval-msec");
90-
node_cmd.push_arg(self.keep_alive_interval_msec.to_string());
89+
90+
if let Some(keep_alive_interval_msec) = self.keep_alive_interval_msec {
91+
node_cmd.push_arg("--keep-alive-interval-msec");
92+
node_cmd.push_arg(keep_alive_interval_msec.to_string());
93+
}
9194

9295
if self.is_local {
9396
node_cmd.push_arg("--skip-igd");

0 commit comments

Comments
 (0)