Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/bastion/azext_bastion/tunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, cli_ctx, local_addr, local_port, bastion, bastion_endpoint, r
def is_port_open(self):
is_port_open = False
with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as sock:
if sock.connect_ex(('', self.local_port)) == 0:
if sock.connect_ex((self.local_addr, self.local_port)) == 0:
logger.info('Port %s is NOT open', self.local_port)
else:
logger.info('Port %s is open', self.local_port)
Comment thread
sabbour marked this conversation as resolved.
Expand Down
Loading