From f025a7440d4b8aefd7a3515f88af79503c269ad0 Mon Sep 17 00:00:00 2001 From: Hans Hasselberg Date: Wed, 11 Sep 2019 11:01:37 +0200 Subject: [PATCH] agent: handleEnterpriseLeave (#6453) --- agent/consul/enterprise_server_oss.go | 4 ++++ agent/consul/server.go | 3 +++ 2 files changed, 7 insertions(+) diff --git a/agent/consul/enterprise_server_oss.go b/agent/consul/enterprise_server_oss.go index 6461e06ac..238cbffde 100644 --- a/agent/consul/enterprise_server_oss.go +++ b/agent/consul/enterprise_server_oss.go @@ -34,6 +34,10 @@ func (s *Server) handleEnterpriseRPCConn(rtype pool.RPCType, conn net.Conn, isTL return false } +func (s *Server) handleEnterpriseLeave() { + return +} + func (s *Server) enterpriseStats() map[string]map[string]string { return nil } diff --git a/agent/consul/server.go b/agent/consul/server.go index 37aefb61d..895f9cc04 100644 --- a/agent/consul/server.go +++ b/agent/consul/server.go @@ -897,6 +897,9 @@ func (s *Server) Leave() error { } } + // Leave everything enterprise related as well + s.handleEnterpriseLeave() + // Start refusing RPCs now that we've left the LAN pool. It's important // to do this *after* we've left the LAN pool so that clients will know // to shift onto another server if they perform a retry. We also wake up