Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue launchbadge#2821 Update error handling logic when opening a TCP…
… connection 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".
- Loading branch information