Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76430 - trunk/boost/asio/detail/impl
From: chris_at_[hidden]
Date: 2012-01-12 07:27:02


Author: chris_kohlhoff
Date: 2012-01-12 07:27:02 EST (Thu, 12 Jan 2012)
New Revision: 76430
URL: http://svn.boost.org/trac/boost/changeset/76430

Log:
On linux, connect can return EAGAIN in certain circumstances. Remap to another
error so that it doesn't look like a non-blocking operation. Refs #6048.

Text files modified:
   trunk/boost/asio/detail/impl/socket_ops.ipp | 4 ++++
   1 files changed, 4 insertions(+), 0 deletions(-)

Modified: trunk/boost/asio/detail/impl/socket_ops.ipp
==============================================================================
--- trunk/boost/asio/detail/impl/socket_ops.ipp (original)
+++ trunk/boost/asio/detail/impl/socket_ops.ipp 2012-01-12 07:27:02 EST (Thu, 12 Jan 2012)
@@ -465,6 +465,10 @@
         &msghdr::msg_namelen, s, addr, addrlen), ec);
   if (result == 0)
     ec = boost::system::error_code();
+#if defined(__linux__)
+ else if (ec == boost::asio::error::try_again)
+ ec = boost::asio::error::no_buffer_space;
+#endif // defined(__linux__)
   return result;
 }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk