diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ansible/executor/task_executor.py | 1 | ||||
-rw-r--r-- | lib/ansible/plugins/cliconf/__init__.py | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index 086db41935..9adc7e1352 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -743,6 +743,7 @@ class TaskExecutor: self._play_context.set_options_from_plugin(connection) if any(((connection.supports_persistence and C.USE_PERSISTENT_CONNECTIONS), connection.force_persistence)): + self._play_context.timeout = C.PERSISTENT_COMMAND_TIMEOUT display.vvvv('attempting to start connection', host=self._play_context.remote_addr) display.vvvv('using connection plugin %s' % connection.transport, host=self._play_context.remote_addr) socket_path = self._start_connection() diff --git a/lib/ansible/plugins/cliconf/__init__.py b/lib/ansible/plugins/cliconf/__init__.py index 44696ef0d4..0aaca9e47f 100644 --- a/lib/ansible/plugins/cliconf/__init__.py +++ b/lib/ansible/plugins/cliconf/__init__.py @@ -106,11 +106,7 @@ class CliconfBase(with_metaclass(ABCMeta, object)): if answer is not None: kwargs['answer'] = to_bytes(answer) - if not signal.getsignal(signal.SIGALRM): - signal.signal(signal.SIGALRM, self._alarm_handler) - signal.alarm(self._connection._play_context.timeout) resp = self._connection.send(**kwargs) - signal.alarm(0) return resp def get_base_rpc(self): |