Fix deadlock in monitor
parent
05ec9599b7
commit
774e398612
|
@ -166,11 +166,11 @@ type RemoteWriterConfig struct {
|
|||
|
||||
// SetPointsWriter can be used to set a writer for the monitoring points.
|
||||
func (m *Monitor) SetPointsWriter(pw PointsWriter) error {
|
||||
m.mu.Lock()
|
||||
if !m.storeEnabled {
|
||||
// not enabled, nothing to do
|
||||
return nil
|
||||
}
|
||||
m.mu.Lock()
|
||||
m.PointsWriter = pw
|
||||
m.mu.Unlock()
|
||||
|
||||
|
|
Loading…
Reference in New Issue