From 080180fb986f6fd1040569f79a5b2060eb9ca74c Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Thu, 21 Jan 2016 13:33:53 -0500 Subject: [PATCH] Fix loop.create_server to accept a list of hosts --- tests/test_tcp.py | 2 +- uvloop/loop.pyx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_tcp.py b/tests/test_tcp.py index 59c1ae4..2010693 100644 --- a/tests/test_tcp.py +++ b/tests/test_tcp.py @@ -45,7 +45,7 @@ class _TestTCP: try: srv = await asyncio.start_server( handle_client, - '127.0.0.1', 0, + ('127.0.0.1', 'localhost'), 0, family=socket.AF_INET, loop=self.loop) diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx index fa03673..eb1f763 100644 --- a/uvloop/loop.pyx +++ b/uvloop/loop.pyx @@ -779,7 +779,7 @@ cdef class Loop: return self._getaddrinfo(host, port, family, type, proto, flags, 1) @aio_coroutine - async def create_server(self, protocol_factory, str host, int port, + async def create_server(self, protocol_factory, host, int port, *, int family=uv.AF_UNSPEC, int flags=uv.AI_PASSIVE,