[ndnSIM] One more fix of the hacked scheduler
Change-Id: Ie95d771f5c955e7d4ae25ac2b61b93c84d5afd80
diff --git a/ndn-cxx/util/scheduler.cpp b/ndn-cxx/util/scheduler.cpp
index c51bd75..df2c460 100644
--- a/ndn-cxx/util/scheduler.cpp
+++ b/ndn-cxx/util/scheduler.cpp
@@ -115,13 +115,11 @@
return;
}
- if (info->queueIt == m_queue.begin()) {
- if (m_timerEvent) {
- if (!m_timerEvent->IsExpired()) {
- ns3::Simulator::Remove(*m_timerEvent);
- }
- m_timerEvent.reset();
+ if (m_timerEvent) {
+ if (!m_timerEvent->IsExpired()) {
+ ns3::Simulator::Remove(*m_timerEvent);
}
+ m_timerEvent.reset();
}
m_queue.erase(info->queueIt);