mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Fix multiplication problem for #3431
The pyzmq bindings already do the conversion to milliseconds (https://github.com/zeromq/pyzmq/blob/master/zmq/eventloop/ioloop.py) So instead of sleeping 60 seconds, we are sleeping 60000 seconds (~16 hours) which is causing the cli to "never return" In addition we aren't passing the timeout of the command from the client down tot the zmq socket
This commit is contained in:
parent
813939636a
commit
c9b4ad41c4
@ -979,7 +979,7 @@ class LocalClient(object):
|
||||
sreq = salt.payload.SREQ(
|
||||
'tcp://{0[interface]}:{0[ret_port]}'.format(self.opts),
|
||||
)
|
||||
payload = sreq.send('clear', payload_kwargs)
|
||||
payload = sreq.send('clear', payload_kwargs, timeout=timeout)
|
||||
|
||||
# We have the payload, let's get rid of SREQ fast(GC'ed faster)
|
||||
del(sreq)
|
||||
|
@ -146,7 +146,7 @@ class SREQ(object):
|
||||
self.poller.register(self.socket, zmq.POLLIN)
|
||||
tried = 0
|
||||
while True:
|
||||
polled = self.poller.poll(timeout * 1000)
|
||||
polled = self.poller.poll(timeout)
|
||||
tried += 1
|
||||
if polled:
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user