server: ensure that we also shutdown network segment serf instances on server shutdown (#8786)
This really only matters for unit tests, since typically if an agent shuts down its server, it follows that up by exiting the process, which would also clean up all of the networking anyway.
This commit is contained in:
parent
3bd129d445
commit
ccd0200bd9
|
@ -0,0 +1,3 @@
|
|||
```release-note:improvement
|
||||
server: **(Consul Enterprise only)** ensure that we also shutdown network segment serf instances on server shutdown
|
||||
```
|
|
@ -914,6 +914,10 @@ func (s *Server) Shutdown() error {
|
|||
s.serfLAN.Shutdown()
|
||||
}
|
||||
|
||||
for _, segment := range s.segmentLAN {
|
||||
segment.Shutdown()
|
||||
}
|
||||
|
||||
if s.serfWAN != nil {
|
||||
s.serfWAN.Shutdown()
|
||||
if err := s.router.RemoveArea(types.AreaWAN); err != nil {
|
||||
|
|
Loading…
Reference in New Issue