Improve Inventory::SyncLoop to Avoid Blocking Agent Stop #445
Labels
level/task
Task issue
module/agent
module/inventory
Inventory module
type/enhancement
Enhancement issue
Description
The current implementation of the Inventory::SyncLoop function in the Inventory module may cause unnecessary delays during the agent shutdown process. Specifically, the Scan() method is called after the stop condition (m_stopping) is triggered, leading to potential delays if Scan() is a time-consuming operation.
Problem Details
Steps to Reproduce
Proposed Solution
Update the SyncLoop function to verify the m_stopping condition after the wait operation and before calling Scan(). This ensures that no unnecessary Scan() operation is performed after a stop request is issued.
Option
The text was updated successfully, but these errors were encountered: