From e766351f9e16b27b406735e82fc9df948efb71c0 Mon Sep 17 00:00:00 2001 From: yaggytter Date: Fri, 6 Jul 2018 12:55:34 +0900 Subject: [PATCH] Fixed: can not connect when using slot option. --- src/webapp/azext_webapp/custom.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/webapp/azext_webapp/custom.py b/src/webapp/azext_webapp/custom.py index 63fdcccbe1a..ccf4feb180e 100644 --- a/src/webapp/azext_webapp/custom.py +++ b/src/webapp/azext_webapp/custom.py @@ -247,7 +247,10 @@ def create_tunnel(cmd, resource_group_name, name, port=None, slot=None): if port is None: port = 0 # Will auto-select a free port from 1024-65535 logger.info('No port defined, creating on random free port') - tunnel_server = TunnelServer('', port, name, user_name, user_password) + host_name = name + if slot is not None: + host_name += "-" + slot + tunnel_server = TunnelServer('', port, host_name, user_name, user_password) config = get_site_configs(cmd, resource_group_name, name, slot) _ping_scm_site(cmd, resource_group_name, name)