Commit b4dd21e0 authored by Jason Madden's avatar Jason Madden

Use localhost for windows.

parent 9edbba34
......@@ -51,8 +51,8 @@
attempted at every import. This could lead to scattered "gevent"
directories and undependable results.
- Servers: Default to AF_INET6 when binding to all addresses. This
supports both IPv4 and IPv6 connections. Original change in
:pr:`495` by Felix Kaiser.
supports both IPv4 and IPv6 connections (except perhaps on Windows).
Original change in :pr:`495` by Felix Kaiser.
1.1.0 (Mar 5, 2016)
......
......@@ -287,8 +287,9 @@ class TestCase(greentest.TestCase):
def connect(self):
# connect on ipv4, even though we bound to ipv6 too
# to prove ipv4 works
conn = socket.create_connection(('127.0.0.1', self.port))
# to prove ipv4 works...except on Windows, it apparently doesn't.
# So use the hostname.
conn = socket.create_connection(('localhost', self.port))
self.connected.append(weakref.ref(conn))
result = conn
if PY3:
......
......@@ -24,7 +24,7 @@ class Test(greentest.TestCase):
def test_recv_closed(self):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('127.0.0.1', self.server.server_port))
sock.connect(('localhost', self.server.server_port))
receiver = gevent.spawn(sock.recv, 25)
try:
gevent.sleep(0.001)
......@@ -39,7 +39,7 @@ class Test(greentest.TestCase):
def test_recv_twice(self):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('127.0.0.1', self.server.server_port))
sock.connect(('localhost', self.server.server_port))
receiver = gevent.spawn(sock.recv, 25)
try:
gevent.sleep(0.001)
......
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