mirror of
https://github.com/go-micro/go-micro.git
synced 2025-07-12 22:41:07 +02:00
IPV6 too many colons in address net.SplitHostPort need ipv6 address in [host]:port format
This commit is contained in:
@ -13,6 +13,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
proto "github.com/asim/go-micro/plugins/broker/grpc/v4/proto"
|
||||
"github.com/google/uuid"
|
||||
"go-micro.dev/v4/broker"
|
||||
"go-micro.dev/v4/cmd"
|
||||
@ -23,7 +24,6 @@ import (
|
||||
maddr "go-micro.dev/v4/util/addr"
|
||||
mnet "go-micro.dev/v4/util/net"
|
||||
mls "go-micro.dev/v4/util/tls"
|
||||
proto "github.com/asim/go-micro/plugins/broker/grpc/v4/proto"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
)
|
||||
@ -505,7 +505,7 @@ func (h *grpcBroker) Subscribe(topic string, handler broker.Handler, opts ...bro
|
||||
// register service
|
||||
node := ®istry.Node{
|
||||
Id: id,
|
||||
Address: fmt.Sprintf("%s:%d", addr, port),
|
||||
Address: net.JoinHostPort(addr, fmt.Sprint(port)),
|
||||
Metadata: map[string]string{
|
||||
"secure": fmt.Sprintf("%t", secure),
|
||||
},
|
||||
|
Reference in New Issue
Block a user