Close pub channel returned by eval_master coroutine

This commit is contained in:
Daniel A. Wozniak 2023-11-21 14:34:46 -07:00 committed by Pedro Algarvio
parent 09b869dd11
commit af12352cba

View file

@ -953,7 +953,18 @@ class SMinion(MinionBase):
"use_master_when_local", False
):
io_loop = salt.ext.tornado.ioloop.IOLoop.current()
io_loop.run_sync(lambda: self.eval_master(self.opts, failed=True))
@salt.ext.tornado.gen.coroutine
def eval_master():
"""
Wrap eval master in order to close the returned publish channel.
"""
master, pub_channel = yield self.eval_master(self.opts, failed=True)
pub_channel.close()
io_loop.run_sync(
lambda: eval_master() # pylint: disable=unnecessary-lambda
)
self.gen_modules(initial_load=True, context=context)
# If configured, cache pillar data on the minion