Don't subscribe to events if not sure it would read them.

Reactor uses LocalClient to send message but do not read events that
produces memory leak in EventPublisher: sent messages are collected
there in the IOStream class.
This commit is contained in:
Dmitry Kuzmenko 2016-09-02 17:20:30 +03:00
parent d248ab0120
commit 01911c530e

View file

@ -1493,10 +1493,6 @@ class LocalClient(object):
master_uri=master_uri)
try:
# Ensure that the event subscriber is connected.
# If not, we won't get a response, so error out
if not self.event.connect_pub(timeout=timeout):
raise SaltReqTimeoutError()
payload = channel.send(payload_kwargs, timeout=timeout)
except SaltReqTimeoutError:
raise SaltReqTimeoutError(