kolide / launcher

Osquery launcher, autoupdater, and packager
https://kolide.com/launcher
Other
500 stars 99 forks source link

Do not make additional control server fetch request during control server interval update #1675

Closed RebeccaMahany closed 2 months ago

RebeccaMahany commented 2 months ago

Because we are already inside a Fetch call, the fetchMutex is locked -- so, currently, whenever the control request interval updates we deadlock forever and launcher will not make a request to the control server until it is restarted.

This PR removes the possibility for deadlock during the extra Fetch call. I also made a couple small adjustments to prevent data races in the new test.