mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #13156 from amenonsen/broken-timeout
If ssh died, it's an error, not a timeout
This commit is contained in:
commit
634e10e5b8
1 changed files with 4 additions and 0 deletions
|
@ -414,6 +414,10 @@ class Connection(ConnectionBase):
|
|||
|
||||
if not rfd:
|
||||
if state <= states.index('awaiting_escalation'):
|
||||
# If the process has already exited, then it's not really a
|
||||
# timeout; we'll let the normal error handling deal with it.
|
||||
if p.poll() is not None:
|
||||
break
|
||||
self._terminate_process(p)
|
||||
raise AnsibleError('Timeout (%ds) waiting for privilege escalation prompt: %s' % (timeout, stdout))
|
||||
|
||||
|
|
Loading…
Reference in a new issue