netPerfRX Reset() should use write Lock() (#16043)

This commit is contained in:
jiuker 2022-11-11 11:44:20 +08:00 committed by GitHub
parent e32b948a49
commit bdcb485740
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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{}