10 Aug
2011
10 Aug
'11
5:57 a.m.
Just for the record, I finally found the problem. The async_read operation needs to be canceled just like the timer: while(1) { io.reset(); io.poll_one(ec); if ( read_result ) { timer.cancel(); return; } else if ( timer_result ) { stream.cancel(); throw std::runtime_error("timeout"); } } } -- Allan