Merge branch 'master' into runtime-multitenancy
This commit is contained in:
commit
cf37d64819
@ -112,8 +112,8 @@ func (s *service) run(exit chan bool) {
|
||||
}
|
||||
|
||||
func (s *service) register() error {
|
||||
s.RLock()
|
||||
defer s.RUnlock()
|
||||
s.Lock()
|
||||
defer s.Unlock()
|
||||
|
||||
if s.srv == nil {
|
||||
return nil
|
||||
@ -142,8 +142,8 @@ func (s *service) register() error {
|
||||
}
|
||||
|
||||
func (s *service) deregister() error {
|
||||
s.RLock()
|
||||
defer s.RUnlock()
|
||||
s.Lock()
|
||||
defer s.Unlock()
|
||||
|
||||
if s.srv == nil {
|
||||
return nil
|
||||
@ -406,7 +406,9 @@ func (s *service) Init(opts ...Option) error {
|
||||
|
||||
s.RLock()
|
||||
// pass in own name and version
|
||||
serviceOpts = append(serviceOpts, micro.Name(s.opts.Name))
|
||||
if s.opts.Service.Name() == "" {
|
||||
serviceOpts = append(serviceOpts, micro.Name(s.opts.Name))
|
||||
}
|
||||
serviceOpts = append(serviceOpts, micro.Version(s.opts.Version))
|
||||
s.RUnlock()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user