boost::asio::deadline_timer
timer(socket_.io_service(),boost::posix_time::seconds(5));
 timer.async_wait(boost::bind(set_result, &timer_result, _1));

Does it work if you rewrite it as follows?

boost::asio::deadline_timer timer(socket_.io_service());
timer.expires_from_now(boost::posix_time::seconds(5));
timer.async_wait(boost::bind(set_result, &timer_result, _1));