mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-02-18 00:17:39 +01:00
The agent was crashing with 'fatal error: concurrent map writes' when handleCheckUpdatesCommand spawned a goroutine that called collectOnce concurrently with the main collection loop. Both code paths access a.prevContainerCPU without synchronization. Added a.cpuMu mutex to protect all accesses to prevContainerCPU in: - pruneStaleCPUSamples() - collectContainer() delete operation - calculateContainerCPUPercent() Related to #1063