checks connected property to validate connection in Server (#20695)
fixes #20693
This commit is contained in:
parent
614390a310
commit
d668d53112
1 changed files with 2 additions and 2 deletions
|
@ -120,8 +120,8 @@ class Server():
|
|||
self._start_time = datetime.datetime.now()
|
||||
|
||||
self.conn = connection_loader.get(play_context.connection, play_context, sys.stdin)
|
||||
rc, out, err = self.conn._connect()
|
||||
if rc != 0:
|
||||
self.conn._connect()
|
||||
if not self.conn.connected:
|
||||
raise AnsibleConnectionFailure(err)
|
||||
|
||||
self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||
|
|
Loading…
Reference in a new issue