From bdcb485740ee2cf320c9b331ebd354df5bf6d826 Mon Sep 17 00:00:00 2001 From: jiuker <2818723467@qq.com> Date: Fri, 11 Nov 2022 11:44:20 +0800 Subject: [PATCH] netPerfRX Reset() should use write Lock() (#16043) --- cmd/perf-tests.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/perf-tests.go b/cmd/perf-tests.go index 1487f9373..51488fec8 100644 --- a/cmd/perf-tests.go +++ b/cmd/perf-tests.go @@ -261,8 +261,8 @@ func (n *netPerfRX) ActiveConnections() uint64 { } func (n *netPerfRX) Reset() { - n.RLock() - defer n.RUnlock() + n.Lock() + defer n.Unlock() n.RX = 0 n.RXSample = 0 n.lastToConnect = time.Time{}