Re: [Boost-bugs] [Boost C++ Libraries] #7392: boost::asio::ip::tcp::socket::is_open returns true even if socket is unusable

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7392: boost::asio::ip::tcp::socket::is_open returns true even if socket is unusable
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-12-29 10:03:07


#7392: boost::asio::ip::tcp::socket::is_open returns true even if socket is
unusable
------------------------------------------------------+---------------------
  Reporter: Valentin Shtronda <valiko.ua@…> | Owner: chris_kohlhoff
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: asio
   Version: Boost 1.49.0 | Severity: Problem
Resolution: invalid | Keywords:
------------------------------------------------------+---------------------
Changes (by chris_kohlhoff):

  * status: new => closed
  * resolution: => invalid

Comment:

 A socket is not automatically closed when the connect fails, hence is_open
 still returns true. This is the intended (and documented) behaviour. You
 need to check the error code produced by the operation and act on it
 accordingly.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7392#comment:4>
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:50:11 UTC