Skip to content

asio::async_connect reports success on failure #6

Description

@BenPope

if you compile asio/src/examples/cpp11/chat/chat_client.cpp and point it at a host and port that doesn't exist or refuses the connection, instead of coming back with an error, such as host not found or connection refused, the error_code reports success (on the conversion to bool). (you might want to embellish the example with a std::cout << ec.message() << std::endl;)

This appears to be the case across Linux, Darwin, iOS and Android

synchronous connect seems to work correctly (i.e., echo/blocking_tcp_echo_client.cpp)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions