Ver código fonte

add parseEndpoint

xiandong 2 anos atrás
pai
commit
16a5f30b0c
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      core/trace/config.go

+ 1 - 1
core/trace/config.go

@@ -20,7 +20,7 @@ func (c *Config) parseEndpoint() (host string, port string) {
 	if len(EndpointSlice) > 0 {
 		host = strings.TrimSpace(EndpointSlice[0])
 	}
-	if len(EndpointSlice) > 0 {
+	if len(EndpointSlice) > 1 {
 		port = strings.TrimSpace(EndpointSlice[1])
 	}
 	return host, port