Skip to content

Commit

Permalink
Connect to localhost instead of the socket's binding address.
Browse files Browse the repository at this point in the history
The bound address is 0.0.0.0 which usually implies all
available interfaces, which makes sense when listening
for something. However, when connecting to an address,
a specific address needs to be targeted. Hopefully, any
properly configured computer should have `localhost`
pointing to its loopback interface. Fixes #64
  • Loading branch information
ammaraskar committed Jul 16, 2017
1 parent 2cf1d3c commit ca4fd66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
class _ConnectTest(unittest.TestCase):
def _test_connect(self, client_version=None, server_version=None):
server = FakeServer(minecraft_version=server_version)
addr, port = server.listen_socket.getsockname()
addr = "localhost"
port = server.listen_socket.getsockname()[1]

cond = threading.Condition()

Expand Down

0 comments on commit ca4fd66

Please sign in to comment.