Fix for better unregistering?

This commit is contained in:
Piotr Biernat 2024-07-17 18:57:50 +02:00
parent b1f04badd5
commit b699008fa3

View File

@ -95,6 +95,11 @@ func (s *Service) Register() error {
return nil return nil
} }
func (s *Service) Unregister() error { func (s *Service) Unregister() error {
s.client.Catalog().Deregister(&consul.CatalogDeregistration{
Address: s.Address,
ServiceID: s.GetID(),
}, nil)
return s.agent.ServiceDeregister(s.GetID()) return s.agent.ServiceDeregister(s.GetID())
} }