
Hi Folks, Boost version is 1.36, OS is linux rhel-4. I have an application with two threads. The secondary thread is a worker thread that manages a boost::asio tcp/ip socket. The worker thread performs blocking reads as per: try { boost::system::error_code error; boost::asio::read(mysocket, boost::asio::buffer(inputbuffer, size_to_read), boost::asio::transfer_all(), error); if(error) { throw boost::system::system_error(error); } } catch(boost::system::system_error se){ // log error here return false; } In the main application thread, in response to the user choosing to close the connection, I do: mysocket.cancel(); mysocket.close(); I would expect the worker thread to return from the blocking boost::asio::read call, with an error. This occurs on windows, but does not happen on the linux build of my app - it never returns from the above call. Why does the second thread never return? What am I doing wrong? I have considered: - implementing a timeout - but I don't want to move to async sockets. - It seems SO_RCVTIMEO, is wrapped by boost::asio::read, so no hope there. - I could kill the thread but that means it isn't cleaned up properly, so that is no good. What am I doing wrong? cheers Nick Aschberger