Use the correct vector of timer queues when dispatching timers.

This commit is contained in:
chris_kohlhoff 2008-02-22 22:23:08 +00:00
parent 34c5f68a30
commit 87f1b82936

View File

@ -420,11 +420,11 @@ private:
{
asio::detail::mutex::scoped_lock lock(timer_mutex_);
timer_queues_copy_ = timer_queues_;
for (std::size_t i = 0; i < timer_queues_.size(); ++i)
for (std::size_t i = 0; i < timer_queues_copy_.size(); ++i)
{
timer_queues_[i]->dispatch_timers();
timer_queues_[i]->dispatch_cancellations();
timer_queues_[i]->cleanup_timers();
timer_queues_copy_[i]->dispatch_timers();
timer_queues_copy_[i]->dispatch_cancellations();
timer_queues_copy_[i]->cleanup_timers();
}
}
catch (...)