Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8722: The boost::asio::windows::stream_handle::read_some method may (incorrectly) throw when used with named-pipes in message mode (on Windows) and receives an ERROR_MORE_DATA error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-24 12:48:42
#8722: The boost::asio::windows::stream_handle::read_some method may (incorrectly)
throw when used with named-pipes in message mode (on Windows) and receives
an ERROR_MORE_DATA error
-----------------------------------------+----------------------------
Reporter: Dentcho Bankov <dbankov@â¦> | Owner: chris_kohlhoff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
-----------------------------------------+----------------------------
Comment (by Dentcho Bankov <dbankov@â¦>):
Code formatting in my previous comment is awful. I'm sorry I should have
previewed it.
Here is another attempt:
{{{
// Wait for the operation to complete.
DWORD bytes_transferred = 0;
ok = ::GetOverlappedResult(impl.handle_,
&overlapped, &bytes_transferred, TRUE);
if (!ok)
{
DWORD last_error = ::GetLastError();
if (last_error != ERROR_MORE_DATA) // <--- the added "if" statement
{
if (last_error == ERROR_HANDLE_EOF)
{
ec = boost::asio::error::eof;
}
else
{
ec = boost::system::error_code(last_error,
boost::asio::error::get_system_category());
}
return 0;
}
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8722#comment:1> 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:13 UTC