sqlx/sqlx-core
Anup Jadhav 49ccc7ca32
issue #2821 Update error handling logic when opening a TCP connection (#2822)
This commit updates the error handling logic in the `connect_tcp` function. Previously, the function would panic if the hostname did not resolve to at least one address.

The updated logic attempts to establish a TCP connection for each address that the hostname resolves to. If it fails to connect to any of the addresses, it will return the last encountered error. If the hostname doesn't resolve to any addresses, the function returns a custom error message stating "Hostname did not resolve to any addresses".
2023-10-19 14:55:45 -07:00
..
2023-07-08 12:42:32 -07:00