id summary reporter owner description type status milestone component version severity resolution keywords cc 13581 `basic_stream_socket::read_some` on `non_blocked` socket returns `ec=would_block` Dmytro Ovdiienko chris_kohlhoff "In the `boost\asio\detail\impl\socket_ops.ipp` file there is `sync_recv` function which should block until some data is received. Inside this function there is following `if` block {{{ if ((state & user_set_non_blocking) || (ec != boost::asio::error::would_block && ec != boost::asio::error::try_again)) return 0; }}} IMHO condition is wrong here. It should return 0 for all cases except socket is in `non_blocking` mode and ec is one of `[would_block, try_again]` In fact if socket is in 'non-blocked' mode and ec = would_block, it also returns 0. If assumption is correct, code should look like {{{ if (0 == (state & user_set_non_blocking) || (ec != boost::asio::error::would_block && ec != boost::asio::error::try_again)) return 0; }}} " Bugs new To Be Determined asio Boost Development Trunk Problem non-blocked