In the current implementation, it raises an error immediately if a process fails at an ip address.
Why don't all element in addrinfos try to connect at first and throw an exception?
( The current implementation: https://github.com/mysql/mysql-connector-python/blob/403535dbdd45d894c780da23ba96b1a6c81e3866/lib/mysql/connector/network.py#L607 )
For example, if we use the --add-host=localhost:<local-ip-address> option when launch docker container,
it would insert the specified IP address in /etc/hosts.
However, the process connecting to mysql-db using mysql-connector-python fails in the current implementation when accessing 127.0.0.1 (which is usually set up) and the inserted ip adress are not used to access.
Why don't all element in addrinfos try to connect at first and throw an exception?
( The current implementation: https://github.com/mysql/mysql-connector-python/blob/403535dbdd45d894c780da23ba96b1a6c81e3866/lib/mysql/connector/network.py#L607 )
For example, if we use the --add-host=localhost:<local-ip-address> option when launch docker container,
it would insert the specified IP address in /etc/hosts.
However, the process connecting to mysql-db using mysql-connector-python fails in the current implementation when accessing 127.0.0.1 (which is usually set up) and the inserted ip adress are not used to access.