fw: fix clang compilation error in best-route v2 test case
refs #2179
Change-Id: Ibee6e9c27fd3a0aae7bd1611428f986cff1d1df0
diff --git a/tests/daemon/fw/best-route-strategy2.cpp b/tests/daemon/fw/best-route-strategy2.cpp
index 1c69dfb..3a0005b 100644
--- a/tests/daemon/fw/best-route-strategy2.cpp
+++ b/tests/daemon/fw/best-route-strategy2.cpp
@@ -82,7 +82,8 @@
scheduler::EventId retxFrom4Evt;
size_t nSentLast = strategy.m_sendInterestHistory.size();
time::steady_clock::TimePoint timeSentLast = time::steady_clock::now();
- function<void()> periodicalRetxFrom4 = [&] {
+ function<void()> periodicalRetxFrom4; // let periodicalRetxFrom4 lambda capture itself
+ periodicalRetxFrom4 = [&] {
pitEntry->insertOrUpdateInRecord(face4, *interest);
strategy.afterReceiveInterest(*face4, *interest, fibEntry, pitEntry);