id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 12925,boost::asio::ip::tcp::socket::async_read_some() changes socket to non-blocking,yogevch@…,chris_kohlhoff,"I'm not sure if it's an issue or not, so I'll try to explain without lots of code examples: I have a socket: {{{ boost::asio::ip::tcp::socket sock(ioservice); sock.open(boost::asio::ip::tcp::v4()); }}} I've connected the socket to external application with a third party API, which is a blocking call (for a blocking socket): {{{ third_party_connect(sock.native(), ip); }}} And waited for some data on this socket: {{{ mSubSock.async_read_some(boost::asio::null_buffers(), std::bind(&MyClass::OnData, this, std::placeholders::_1)); }}} When MyClass::OnData got called, I've noticed that the socket turned to non blocking socket: {{{ sock.native_non_blocking(); -> returns 'true' anotherThirdPartyAPI(sub.native()); -> fails with EAGAIN because socket turned to non-blocking }}} Then another third party API call fails inside the MyClass::OnData function with errno: EAGAIN. Is this the expected behaviour? why did my socket changed to non-blocking? (I've checked before the call to 'async_read_some' and it was blocking). I hope I was clear enough. Thanks",Bugs,new,To Be Determined,asio,Boost 1.60.0,Problem,,async_read_some non-blocking,yogevch@…