Close and flush perf standby conns/cache when sealing. (#7183)

This commit is contained in:
ncabatoff 2019-07-24 16:32:57 -04:00 committed by GitHub
parent d2a5a3035c
commit bea627f410
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -111,6 +111,8 @@ func (c *Core) invalidateSentinelPolicy(PolicyType, string) {}
func (c *Core) removePerfStandbySecondary(context.Context, string) {}
func (c *Core) removeAllPerfStandbySecondaries() {}
func (c *Core) perfStandbyClusterHandler() (*replication.Cluster, *cache.Cache, chan struct{}, error) {
return nil, cache.New(2*cluster.HeartbeatInterval, 1*time.Second), make(chan struct{}), nil
}

View File

@ -214,6 +214,7 @@ func (c *Core) stopForwarding() {
c.clusterListener.StopHandler(consts.RequestForwardingALPN)
c.clusterListener.StopHandler(consts.PerfStandbyALPN)
}
c.removeAllPerfStandbySecondaries()
}
// refreshRequestForwardingConnection ensures that the client/transport are