fix-907
web service need modify registry service nodes while register interval
This commit is contained in:
parent
bd1918900e
commit
e8d2f207d8
@ -118,6 +118,11 @@ func (s *service) register() error {
|
||||
if s.opts.Registry != nil {
|
||||
r = s.opts.Registry
|
||||
}
|
||||
|
||||
// service node need modify, node address maybe changed
|
||||
srv := s.genSrv()
|
||||
srv.Endpoints = s.srv.Endpoints
|
||||
s.srv = srv
|
||||
return r.Register(s.srv, registry.RegisterTTL(s.opts.RegisterTTL))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user