Boost C++ Libraries: Ticket #2865: asio::ip::tcp::socket::is_open returns true while connecting asynchronously https://svn.boost.org/trac10/ticket/2865 <p> I am using boost 1.38.0 on Linux, and am finding that calls to is_open on an ip::tcp::socket return true as soon as async_connect is called and before the handler for the connection is invoked. This is relatively straightforward to work around, but annoying. </p> <p> boost/asio/detail/reactive_socket_service.hpp line 216: </p> <blockquote> <p> bool is_open(const implementation_type&amp; impl) const { </p> <blockquote> <p> return impl.socket_ != invalid_socket; </p> </blockquote> <p> } </p> </blockquote> <p> boost/asio/detail/reactive_socket_service.hpp line 182: </p> <p> impl.socket_ = sock.release(); (an async_connect is still happening at this time) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2865 Trac 1.4.3 chris_kohlhoff Thu, 09 Apr 2009 12:18:24 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2865#comment:1 https://svn.boost.org/trac10/ticket/2865#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> This is the intended behaviour. The socket has to be open or otherwise you wouldn't be able to cancel the asynchronous connect operation. </p> Ticket