poller.poll ends up calling the poll system call under the hood. If the process which called poll() gets a signal it will raise `ZMQError: Interrupted system call` which we should catch and move continue.
This commit is contained in:
Thomas Jackson 2015-06-04 08:28:16 -07:00
parent 9d7331c87d
commit 2c7afaeebf

View file

@ -284,12 +284,11 @@ class SaltEvent(object):
start = time.time()
timeout_at = start + wait
while not wait or time.time() <= timeout_at:
# convert to milliseconds
socks = dict(self.poller.poll(wait * 1000))
if socks.get(self.sub) != zmq.POLLIN:
continue
try:
# convert to milliseconds
socks = dict(self.poller.poll(wait * 1000))
if socks.get(self.sub) != zmq.POLLIN:
continue
# Please do not use non-blocking mode here.
# Reliability is more important than pure speed on the event bus.
ret = self.get_event_block()