From 0b9124d4fddfc51f2a5739d9bd0953d3a06ae679 Mon Sep 17 00:00:00 2001 From: glzjin Date: Mon, 2 Mar 2020 11:20:08 +0800 Subject: [PATCH] Fix bandwidth compare (#1679) It may cause all proxy restart when api reload. --- models/config/proxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/config/proxy.go b/models/config/proxy.go index f4ddba50..c8c948c3 100644 --- a/models/config/proxy.go +++ b/models/config/proxy.go @@ -149,7 +149,7 @@ func (cfg *BaseProxyConf) compare(cmp *BaseProxyConf) bool { cfg.Group != cmp.Group || cfg.GroupKey != cmp.GroupKey || cfg.ProxyProtocolVersion != cmp.ProxyProtocolVersion || - cfg.BandwidthLimit.Equal(&cmp.BandwidthLimit) || + !cfg.BandwidthLimit.Equal(&cmp.BandwidthLimit) || !reflect.DeepEqual(cfg.Metas, cmp.Metas) { return false }