FDio / govpp

Go toolset for the VPP.
Apache License 2.0
193 stars 82 forks source link

Fix race in statsclient during reconnect #126

Closed dvalter closed 1 year ago

dvalter commented 1 year ago

Background reconnects from monitorSocket() could cause a race between StatsClient.statSegment reassignment and statSegment virtual method calls, detectable by Golang race detector. Now statSegment is protected by RwMutex and StatsClient is protected from spurious background reconnects after Disconnect() call.