Exemple #1
0
    void handle_timeout(const boost::system::error_code& ec)
    {
        if (--count_ > 0)
        {
            rc_->stop();
            rc_.reset( new rc_check(timer_.io_service(), std::string(p_.pp.login).append("@").append(p_.pp.domain),
                            p_.pp.ukey, p_.l, 1) );

            timer_.expires_from_now(boost::posix_time::milliseconds(rand_r(&seed_) % 500));
            timer_.async_wait(strand_.wrap(boost::bind(&tormoz_get::handle_timeout, shared_from_this(), _1)));
        }
        else if (rc_)
        {
            rc_->stop();
            rc_.reset();
        }
    }