[Boost-bugs] [Boost C++ Libraries] #2865: asio::ip::tcp::socket::is_open returns true while connecting asynchronously

Subject: [Boost-bugs] [Boost C++ Libraries] #2865: asio::ip::tcp::socket::is_open returns true while connecting asynchronously
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-03-18 06:36:10


#2865: asio::ip::tcp::socket::is_open returns true while connecting asynchronously
--------------------------------------------------------+-------------------
 Reporter: Benjamin Carlyle <ben.carlyle_at_[hidden]> | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: Boost 1.39.0 | Component: asio
  Version: Boost 1.38.0 | Severity: Problem
 Keywords: |
--------------------------------------------------------+-------------------
 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.

 boost/asio/detail/reactive_socket_service.hpp line 216:
   bool is_open(const implementation_type& impl) const
   {
     return impl.socket_ != invalid_socket;
   }

 boost/asio/detail/reactive_socket_service.hpp line 182:

 impl.socket_ = sock.release();
 (an async_connect is still happening at this time)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2865>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC