Unix socket fix

This commit is contained in:
Jonas Lidén 2018-02-05 16:31:37 +01:00
parent 3bffe981f6
commit 2b3d6af8d6

View File

@ -131,7 +131,9 @@ class Server(object):
Called when a listen succeeds so we can store port details (if there are any) Called when a listen succeeds so we can store port details (if there are any)
""" """
if hasattr(port, "getHost"): if hasattr(port, "getHost"):
self.listening_addresses.append((port.getHost().host, port.getHost().port)) host = port.getHost()
if hasattr(host, 'host') and hasattr(host, 'port'):
self.listening_addresses.append((host.host, host.port))
def listen_error(self, failure): def listen_error(self, failure):
logger.critical("Listen failure: %s", failure.getErrorMessage()) logger.critical("Listen failure: %s", failure.getErrorMessage())