Connect to localhost instead of the socket's binding address.
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
This commit is contained in:
1 file changed
+2
-1
@@ -21,7 +21,8 @@ THREAD_TIMEOUT_S = 5
|
|||||||
class _ConnectTest(unittest.TestCase):
|
class _ConnectTest(unittest.TestCase):
|
||||||
def _test_connect(self, client_version=None, server_version=None):
|
def _test_connect(self, client_version=None, server_version=None):
|
||||||
server = FakeServer(minecraft_version=server_version)
|
server = FakeServer(minecraft_version=server_version)
|
||||||
addr, port = server.listen_socket.getsockname()
|
addr = "localhost"
|
||||||
|
port = server.listen_socket.getsockname()[1]
|
||||||
|
|
||||||
cond = threading.Condition()
|
cond = threading.Condition()
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user