Skip to content

Commit a7eefb5

Browse files
committed
fix race condition for node exporter start
running state might be "Pending" and not yet "Started"
1 parent d6fc661 commit a7eefb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/snclient/listen_managedexporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ func (l *HandlerManagedExporter) JSON() []map[string]string {
204204
}
205205

206206
func (l *HandlerManagedExporter) keepRunning() bool {
207-
return l.snc.IsRunning() && l.keepRunningA.Load()
207+
return l.snc.running.Load() != Stopped && l.keepRunningA.Load()
208208
}
209209

210210
func (l *HandlerManagedExporter) procMainLoop() {

0 commit comments

Comments
 (0)