23 Oct
2008
23 Oct
'08
5:45 p.m.
Thanks, that's it, now how do I filter only successful timer triggers? I added the following line to on_time_out():
http://www.boost.org/doc/libs/1_36_0/doc/html/boost_asio/reference/basic_dea... "For each call to async_wait(), the supplied handler will be called exactly once. The handler will be called when: * The timer has expired. * The timer was cancelled, in which case the handler is passed the error code boost::asio::error::operation_aborted." So usually you test it like this: void handler(const boost::system::error_code &err) { if (err != boost::asio::error::operation_aborted) { // do what you want } //or: if (err && err != boost::asio::error::operation_aborted) { //... } }