diff --git a/broker/http_broker.go b/broker/http_broker.go index c04f47eb..fefeed4d 100644 --- a/broker/http_broker.go +++ b/broker/http_broker.go @@ -19,7 +19,6 @@ import ( "time" "github.com/google/uuid" - "github.com/micro/go-log" "github.com/micro/go-micro/codec/json" merr "github.com/micro/go-micro/errors" "github.com/micro/go-micro/registry" @@ -397,7 +396,6 @@ func (h *httpBroker) Connect() error { return err } - log.Logf("Broker Listening on %s", l.Addr().String()) addr := h.address h.address = l.Addr().String() diff --git a/server/rpc_server.go b/server/rpc_server.go index 1afeff6e..469a4bc4 100644 --- a/server/rpc_server.go +++ b/server/rpc_server.go @@ -438,7 +438,8 @@ func (s *rpcServer) Start() error { return err } - log.Logf("Transport Listening on %s", ts.Addr()) + log.Logf("Transport [%s] Listening on %s", config.Transport.String(), ts.Addr()) + s.Lock() // swap address addr := s.opts.Address @@ -493,7 +494,12 @@ func (s *rpcServer) Start() error { }() // TODO: subscribe to cruft - return config.Broker.Connect() + if err := config.Broker.Connect(); err != nil { + return err + } + + log.Logf("Broker [%s] Listening on %s", config.Broker.String(), config.Broker.Address()) + return nil } func (s *rpcServer) Stop() error {