Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any call to connect will throw_error #386

Open
ksullivanL3 opened this issue Dec 30, 2021 · 0 comments
Open

Any call to connect will throw_error #386

ksullivanL3 opened this issue Dec 30, 2021 · 0 comments

Comments

@ksullivanL3
Copy link

in boost/asio/impl/connect.hpp:line 115, throw_error will be called no matter if there is an error or not. Should the call to this method stay in the call on the previous line forever so that this throw is never reached?

Example code to reproduce:
boost::asio::io_context io;
boost::asio::ip::tcp::resolver resolver(io);

std::string service_name("daytime");
boost::asio::ip::tcp::resolver::results_type endpoints =
  resolver.resolve(argv[1], service_name);
  
boost::asio::ip::tcp::socket socket(io);
std::cout << "Connecting socket with endpoint(s)." << std::endl;
boost::asio::connect(socket, endpoints);  // ERROR thrown here
@mclow mclow transferred this issue from boostorg/boost Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant