mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-12 19:34:02 -07:00
tweak transport_tests to avoid logic duplication (#22158)
This commit is contained in:
parent
28b882e737
commit
42ccf9ca98
2 changed files with 6 additions and 5 deletions
|
@ -92,8 +92,8 @@ class Connection(ConnectionBase):
|
|||
|
||||
def transport_test(self, connect_timeout):
|
||||
''' Test the transport mechanism, if available '''
|
||||
host = self._play_context.remote_addr
|
||||
port = int(self._play_context.port or 5986)
|
||||
host = self._winrm_host
|
||||
port = int(self._winrm_port)
|
||||
display.vvv("attempting transport test to %s:%s" % (host, port))
|
||||
sock = socket.create_connection((host, port), connect_timeout)
|
||||
sock.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue