mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Add poller calls to sub_timeout seq
This commit is contained in:
parent
efa7f30dcb
commit
9cf0ec2da4
@ -488,6 +488,11 @@ class Minion(object):
|
||||
if self.opts['sub_timeout']:
|
||||
last = time.time()
|
||||
while True:
|
||||
socks = dict(poller.poll())
|
||||
if socket in socks and socks[socket] == zmq.POLLIN:
|
||||
payload = self.serial.loads(socket.recv())
|
||||
self._handle_payload(payload)
|
||||
last = time.time()
|
||||
if time.time() - last > self.opts['sub_timeout']:
|
||||
# It has been a while since the last command, make sure
|
||||
# the connection is fresh by reconnecting
|
||||
|
Loading…
Reference in New Issue
Block a user