From e4fc89d592957a2a1aacfdcfdcc681affee67b99 Mon Sep 17 00:00:00 2001 From: Joe Zou <yixian.zou@gmail.com> Date: Mon, 27 Apr 2020 23:29:48 +0800 Subject: [PATCH] travis trigger --- config/service_config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/service_config.go b/config/service_config.go index 832430a9c..f45e78cd6 100644 --- a/config/service_config.go +++ b/config/service_config.go @@ -111,7 +111,7 @@ func NewServiceConfig(id string, context context.Context) *ServiceConfig { func getRandomPort(protocolConfigs []*ProtocolConfig) *list.List { l := list.New() for _, proto := range protocolConfigs { - if proto.Port != "" { + if len(proto.Port) > 0 { continue } @@ -162,7 +162,7 @@ func (c *ServiceConfig) Export() error { port := proto.Port - if proto.Port == "" { + if len(proto.Port) == 0 { port = nextPort.Value.(string) nextPort = nextPort.Next() } -- GitLab