set Mode::UdpOnly via command line -u

- fixes #577
- Why the original code use merge instead of replace?
This commit is contained in:
zonyitoo
2021-07-21 12:48:06 +08:00
parent e4dfd2f9d8
commit 97bb489293
2 changed files with 2 additions and 2 deletions

View File

@@ -203,7 +203,7 @@ fn main() {
// Overrides
if matches.is_present("UDP_ONLY") {
if let Some(ref mut m) = config.manager {
m.mode = m.mode.merge(Mode::UdpOnly);
m.mode = Mode::UdpOnly;
}
}

View File

@@ -178,7 +178,7 @@ fn main() {
}
if matches.is_present("UDP_ONLY") {
sc.set_mode(sc.mode().merge(Mode::UdpOnly));
sc.set_mode(Mode::UdpOnly);
}
if matches.is_present("TCP_AND_UDP") {