Wrap subscriber IP in square brackets when IPv6

Change-Id: Ib7c84bbe1ae4faf3d8a260733dc801a46f28ebe1
Closes-Bug: #1754678
This commit is contained in:
Derek Higgins 2018-03-09 14:53:21 +00:00
parent 4840509fc7
commit 1b385a6d93

View File

@ -130,7 +130,7 @@ class Driver(base.DriverBase):
else: else:
host = socket.gethostname() host = socket.gethostname()
self.notification_factory.set_subscription_url( self.notification_factory.set_subscription_url(
'http://%s:%s/' % (host, port)) 'http://%s:%s/' % (_escape_ipv6(host), port))
self._api.set_subscription_factory(self.notification_factory) self._api.set_subscription_factory(self.notification_factory)
task = asyncio.Task(coro_notification) task = asyncio.Task(coro_notification)