mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
Since AgentReportStats takes a stats function which was doing mutex locking on agent shutdown, it was possible for there to be a deadlock depending on how the AgentReportsStats Close function is implemented. This mostly seems to happen on Windows test runners as it's pretty hard to hit this edge case. The bug currently only exists in the test implementation of AgentReportStats, however, this was refactored to be more robust in case of future changes.