Parse PortRange of UDPPort from cli flag (#2039)

This commit is contained in:
cnderrauber
2023-09-06 14:17:49 +08:00
committed by GitHub
parent b38b51dad8
commit 75ffb25d77
4 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -801,7 +801,7 @@ func (conf *Config) updateFromCLI(c *cli.Context, baseFlags []cli.Flag) error {
conf.RTC.NodeIP = c.String("node-ip")
}
if c.IsSet("udp-port") {
conf.RTC.UDPPort = rtcconfig.PortRange{Start: (c.Int("udp-port"))}
conf.RTC.UDPPort.UnmarshalString(c.String("udp-port"))
}
if c.IsSet("bind") {
conf.BindAddresses = c.StringSlice("bind")