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

This commit is contained in:
Cuong Manh Le
2023-06-28 10:29:37 +07:00
committed by Cuong Manh Le
parent 1d3f8757bc
commit 78a7c87ecc

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()
}