diff --git a/probe/endpoint/procspy/background_reader_linux.go b/probe/endpoint/procspy/background_reader_linux.go index ce4ee2a4f..bcd011656 100644 --- a/probe/endpoint/procspy/background_reader_linux.go +++ b/probe/endpoint/procspy/background_reader_linux.go @@ -99,6 +99,10 @@ func (br *backgroundReader) loop(walker process.Walker) { br.latestSockets = result.sockets br.mtx.Unlock() + if len(result.sockets) != 0 { + log.Info("Received results from THE loop, exiting loop") + return + } // Schedule next walk and adjust its rate limit walkTime := time.Since(begin) rateLimitPeriod, restInterval = scheduleNextWalk(rateLimitPeriod, walkTime)