Commit fbbd9655 authored by Jim Fulton's avatar Jim Fulton

convert '' to 'localhost' when connecting

Otherwise, we may fail to connect on some platforms.
parent 74044c8b
......@@ -97,7 +97,8 @@ class Protocol(asyncio.Protocol):
def connect(self):
if isinstance(self.addr, tuple):
host, port = self.addr
cr = self.loop.create_connection(self.protocol_factory, host, port)
cr = self.loop.create_connection(
self.protocol_factory, host or 'localhost', port)
else:
cr = self.loop.create_unix_connection(
self.protocol_factory, self.addr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment