mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
b7078b2e19
This commit fixes couple of issues that could result in blocking OPA: 1) When the bundle plugin attempts to stop the bundle downloader, it first grabs the lock on the plugin and then stops the downloader. The downloader in-turn calls the plugin’s callback function which now waits for the lock to be released by the plugin's stop function. This results in a deadlock. This commit fixes this issue by making sure the plugin's stop function releases the lock before stopping the downloader. 2) Another issue that could block OPA is when the stop function on the same downloader gets called multiple times. Fixes: #3363 Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>