fw: avoid setting PIT unsatisfy timer twice
refs #1448
Change-Id: If48a90be2b554bc7c1ea4b869e1a927bad578e0a
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 1e68600..c6ad6b6 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -323,6 +323,7 @@
// TODO all InRecords are already expired; will this happen?
}
+ scheduler::cancel(pitEntry->m_unsatisfyTimer);
pitEntry->m_unsatisfyTimer = scheduler::schedule(lastExpiryFromNow,
bind(&Forwarder::onInterestUnsatisfied, this, pitEntry));
}
@@ -338,6 +339,7 @@
time::nanoseconds stragglerTime = time::milliseconds(100);
+ scheduler::cancel(pitEntry->m_stragglerTimer);
pitEntry->m_stragglerTimer = scheduler::schedule(stragglerTime,
bind(&Pit::erase, &m_pit, pitEntry));
}