Exit the process cleanly

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2024-01-26 05:54:45 +00:00
parent 3afeaad0a7
commit 890df5021b
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF

View file

@ -281,13 +281,14 @@ class PubServerChannelProcess(salt.utils.process.SignalHandlingProcess):
)
def run(self):
ioloop = tornado.ioloop.IOLoop()
try:
while True:
try:
payload = self.queue.get(False)
except queue.Empty:
if self._closing is True:
break
time.sleep(0.03)
continue
if payload is None: