Add a comment explaining the special logic for IPv6 handling. (#2927)

The logic was added in https://github.com/youtube/vitess/pull/2920.
This commit is contained in:
Pavel Ivanov 2017-06-14 17:29:16 -07:00 коммит произвёл GitHub
Родитель 955579c150
Коммит 512ba51169
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -400,6 +400,8 @@ class BaseEnvironment(object):
['GetTablet', tablet_name]))
host = tablet_info['hostname']
if ':' in host:
# If host is an IPv6 address we need to put it into square brackets to
# form a correct "host:port" value.
host = '[%s]' % host
return '%s:%s' % (host, tablet_info['port_map']['vt'])