You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2022/04/12 10:45:44 UTC

[dubbo-go] branch 3.0 updated: fix host (#1821)

This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/3.0 by this push:
     new 4dcebce40 fix host (#1821)
4dcebce40 is described below

commit 4dcebce4083ebdd4f245fc4344c590ba27125584
Author: quiet-xu <49...@users.noreply.github.com>
AuthorDate: Tue Apr 12 18:45:39 2022 +0800

    fix host (#1821)
---
 registry/base_registry.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/registry/base_registry.go b/registry/base_registry.go
index fdb863d10..1016d88c0 100644
--- a/registry/base_registry.go
+++ b/registry/base_registry.go
@@ -286,7 +286,7 @@ func (r *BaseRegistry) providerRegistry(c *common.URL, params url.Values, f crea
 	}
 	logger.Debugf("provider url params:%#v", params)
 	var host string
-	if len(c.Ip) > 0 {
+	if len(c.Ip) == 0 {
 		host = localIP
 	} else {
 		host = c.Ip