From 87f1b82936b54a6adca1939da3c9a2bcab49c99b Mon Sep 17 00:00:00 2001 From: chris_kohlhoff Date: Fri, 22 Feb 2008 22:23:08 +0000 Subject: [PATCH] Use the correct vector of timer queues when dispatching timers. --- asio/include/asio/detail/win_iocp_io_service.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/asio/include/asio/detail/win_iocp_io_service.hpp b/asio/include/asio/detail/win_iocp_io_service.hpp index fe2e58a0..54c65af0 100644 --- a/asio/include/asio/detail/win_iocp_io_service.hpp +++ b/asio/include/asio/detail/win_iocp_io_service.hpp @@ -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 (...)