From 916740cb8cb601ca3ce9b4f543753e62aa5344db Mon Sep 17 00:00:00 2001 From: Hans Hasselberg Date: Thu, 5 Sep 2019 17:32:45 +0200 Subject: [PATCH] handleEnterpriseLeave --- 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 6461e06ac3b5..238cbffde888 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 37aefb61d024..895f9cc04c6e 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