saltstack/salt — pull request #13194 by olliewalsh (2014-06-03 14:59:37+00:00)
Title: Fix issue #12370

Fix issue #12370.

In a multithreaded minion (i.e. windows) the modules have already been reloaded at line 692.

Calling `saltutil.refresh_modules` is unnecessary and causes a race condition. It sends an event on the minion bus to reload the modules. At some time in the future the main minion loop, which is a different thread in the same process, receives this event and reloads the modules again. This occurs while the other thread is using the modules to apply a state.