19 Aug
2011
19 Aug
'11
8:33 a.m.
Allan Nielsen wrote:
Is this a bug, or am I doing something wrong?
No bug here (I think), as per [1], a cancelled operation will be invoked with an error code - this is so one can discern between a normal invocation and a cancel or error. Your handler could be updated like so: void handler(const boost::system::error_code &ec) { if (!ec) { cout << "Forbidden handler" << endl; assert(0); } else cout << "Timer1 interrupted by someone." << endl; } 1: http://www.boost.org/doc/libs/1_47_0/doc/html/boost_asio/reference/basic_dea...