From 1b385a6d9318dcc04ef88370b2485b6b06a20f72 Mon Sep 17 00:00:00 2001 From: Derek Higgins Date: Fri, 9 Mar 2018 14:53:21 +0000 Subject: [PATCH] Wrap subscriber IP in square brackets when IPv6 Change-Id: Ib7c84bbe1ae4faf3d8a260733dc801a46f28ebe1 Closes-Bug: #1754678 --- zaqar/transport/websocket/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zaqar/transport/websocket/driver.py b/zaqar/transport/websocket/driver.py index be0137b67..77359a4e1 100644 --- a/zaqar/transport/websocket/driver.py +++ b/zaqar/transport/websocket/driver.py @@ -130,7 +130,7 @@ class Driver(base.DriverBase): else: host = socket.gethostname() 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) task = asyncio.Task(coro_notification)