Boost::asio and async_read?

Hmm... The problem here is subtle, basically when you cancel the previous timer - another event is triggered on the io_service (a call to the handler responsible for that timer) to indicate it has been cancelled (with the appropriate error_code). Because you are only calling poll_one the read is good to go, so you handle the read, then you cancel the timer (which sets up the subsequent event on the io_service - but for this run, it does not get called) - and then when your receive() method is called a second time, and you call poll_one - this event is triggered (and because you don't check for error condition in your set_result method), the state of the optional is good (it contains an error) and you treat this as your timeout...

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions