cmd/ctrld: only overwrite listener if not defined in cd mode

This commit is contained in:
Cuong Manh Le authored and Cuong Manh Le committed 2023-08-09 23:54:23 +07:00
1 parent 1d3f8757bc
commit 78a7c87ecc
1 file changed
+1 -1
+1 -1
View File
@@ -777,7 +777,7 @@ func processCDFlags() {
}
switch {
case setupRouter:
if lc := cfg.Listener["0"]; lc != nil {
if lc := cfg.Listener["0"]; lc != nil && lc.IP == "" {
lc.IP = router.ListenIP()
lc.Port = router.ListenPort()
}