diff --git a/daemon/fw/asf-strategy.cpp b/daemon/fw/asf-strategy.cpp
index 90b4ebe..b9a253d 100644
--- a/daemon/fw/asf-strategy.cpp
+++ b/daemon/fw/asf-strategy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -58,7 +58,7 @@
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
 
   NFD_LOG_DEBUG("probing-interval=" << m_probing.getProbingInterval()
-                << " n-silent-timeouts=" << m_maxSilentTimeouts);
+                << " n-silent-timeouts=" << m_nMaxSilentTimeouts);
 }
 
 const Name&
@@ -98,7 +98,7 @@
       m_probing.setProbingInterval(getParamValue(f, s));
     }
     else if (f == "n-silent-timeouts") {
-      m_maxSilentTimeouts = getParamValue(f, s);
+      m_nMaxSilentTimeouts = getParamValue(f, s);
     }
     else {
       NDN_THROW(std::invalid_argument("Parameter should be probing-interval or n-silent-timeouts"));
@@ -193,7 +193,8 @@
 
   // Extend lifetime for measurements associated with Face
   namespaceInfo->extendFaceInfoLifetime(*faceInfo, ingress.face.getId());
-
+  // Extend PIT entry timer to allow slower probes to arrive
+  this->setExpiryTimer(pitEntry, 50_ms);
   faceInfo->cancelTimeout(data.getName());
 }
 
@@ -202,7 +203,7 @@
                               const shared_ptr<pit::Entry>& pitEntry)
 {
   NFD_LOG_DEBUG(nack.getInterest() << " nack from=" << ingress << " reason=" << nack.getReason());
-  onTimeout(pitEntry->getName(), ingress.face.getId());
+  onTimeoutOrNack(pitEntry->getName(), ingress.face.getId(), true);
 }
 
 void
@@ -230,7 +231,7 @@
   if (!faceInfo.isTimeoutScheduled()) {
     auto timeout = faceInfo.scheduleTimeout(interest.getName(),
       [this, name = interest.getName(), faceId = egress.face.getId()] {
-        onTimeout(name, faceId);
+        onTimeoutOrNack(name, faceId, false);
       });
     NFD_LOG_TRACE("Scheduled timeout for " << fibEntry.getPrefix() << " to=" << egress
                   << " in " << time::duration_cast<time::milliseconds>(timeout) << " ms");
@@ -318,7 +319,7 @@
 }
 
 void
-AsfStrategy::onTimeout(const Name& interestName, FaceId faceId)
+AsfStrategy::onTimeoutOrNack(const Name& interestName, FaceId faceId, bool isNack)
 {
   NamespaceInfo* namespaceInfo = m_measurements.getNamespaceInfo(interestName);
   if (namespaceInfo == nullptr) {
@@ -336,7 +337,7 @@
   size_t nTimeouts = faceInfo.getNSilentTimeouts() + 1;
   faceInfo.setNSilentTimeouts(nTimeouts);
 
-  if (nTimeouts <= m_maxSilentTimeouts) {
+  if (nTimeouts <= m_nMaxSilentTimeouts && !isNack) {
     NFD_LOG_TRACE(interestName << " face=" << faceId << " timeout-count=" << nTimeouts << " ignoring");
     // Extend lifetime for measurements associated with Face
     namespaceInfo->extendFaceInfoLifetime(faceInfo, faceId);
diff --git a/daemon/fw/asf-strategy.hpp b/daemon/fw/asf-strategy.hpp
index cba941e..e0d40c7 100644
--- a/daemon/fw/asf-strategy.hpp
+++ b/daemon/fw/asf-strategy.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -83,7 +83,7 @@
                            bool isNewInterest = true);
 
   void
-  onTimeout(const Name& interestName, FaceId faceId);
+  onTimeoutOrNack(const Name& interestName, FaceId faceId, bool isNack);
 
   void
   sendNoRouteNack(const FaceEndpoint& ingress, const shared_ptr<pit::Entry>& pitEntry);
@@ -92,7 +92,7 @@
   AsfMeasurements m_measurements;
   ProbingModule m_probing;
   RetxSuppressionExponential m_retxSuppression;
-  size_t m_maxSilentTimeouts = 0;
+  size_t m_nMaxSilentTimeouts = 3;
 
   static const time::milliseconds RETX_SUPPRESSION_INITIAL;
   static const time::milliseconds RETX_SUPPRESSION_MAX;
diff --git a/tests/daemon/fw/asf-strategy.t.cpp b/tests/daemon/fw/asf-strategy.t.cpp
index 14aa777..90e8524 100644
--- a/tests/daemon/fw/asf-strategy.t.cpp
+++ b/tests/daemon/fw/asf-strategy.t.cpp
@@ -143,7 +143,8 @@
   // and the probe should return Data quicker. ASF should then use the Face
   // to nodeB to forward the remaining Interests.
   BOOST_CHECK_EQUAL(consumer->getForwarderFace().getCounters().nOutData, 30);
-  BOOST_CHECK_GE(linkAB->getFace(nodeA).getCounters().nOutInterests, 24);
+  // Because of exploration, will forward to AB and AD simultaneously at least once
+  BOOST_CHECK_GE(linkAB->getFace(nodeA).getCounters().nOutInterests, 25);
   BOOST_CHECK_LE(linkAD->getFace(nodeA).getCounters().nOutInterests, 6);
 
   // If the link from nodeA to nodeB fails, ASF should start using the Face
@@ -151,11 +152,10 @@
   linkAB->fail();
 
   runConsumer();
-
-  // Only 59 Data because the first Interest to nodeB after the failure should timeout
-  BOOST_CHECK_EQUAL(consumer->getForwarderFace().getCounters().nOutData, 59);
-  BOOST_CHECK_LE(linkAB->getFace(nodeA).getCounters().nOutInterests, 30);
-  BOOST_CHECK_GE(linkAD->getFace(nodeA).getCounters().nOutInterests, 30);
+  // We experience 3 silent timeouts before marking AB as timed out on the fourth interest.
+  BOOST_CHECK_EQUAL(consumer->getForwarderFace().getCounters().nOutData, 56);
+  BOOST_CHECK_LE(linkAB->getFace(nodeA).getCounters().nOutInterests, 36);
+  BOOST_CHECK_GE(linkAD->getFace(nodeA).getCounters().nOutInterests, 24);
 
   // If the link from nodeA to nodeB recovers, ASF should probe the Face
   // to nodeB and start using it again.
@@ -165,8 +165,7 @@
   this->advanceClocks(10_ms, 10_s);
 
   runConsumer();
-
-  BOOST_CHECK_EQUAL(consumer->getForwarderFace().getCounters().nOutData, 89);
+  BOOST_CHECK_EQUAL(consumer->getForwarderFace().getCounters().nOutData, 86);
   BOOST_CHECK_GE(linkAB->getFace(nodeA).getCounters().nOutInterests, 50);
   BOOST_CHECK_LE(linkAD->getFace(nodeA).getCounters().nOutInterests, 40);
 
@@ -176,9 +175,9 @@
 
   runConsumer();
 
-  BOOST_CHECK_EQUAL(consumer->getForwarderFace().getCounters().nOutData, 89);
-  BOOST_CHECK_LE(linkAB->getFace(nodeA).getCounters().nOutInterests, 61); // FIXME #3830
-  BOOST_CHECK_GE(linkAD->getFace(nodeA).getCounters().nOutInterests, 59); // FIXME #3830
+  BOOST_CHECK_EQUAL(consumer->getForwarderFace().getCounters().nOutData, 86);
+  BOOST_CHECK_LE(linkAB->getFace(nodeA).getCounters().nOutInterests, 65); // FIXME #3830
+  BOOST_CHECK_GE(linkAD->getFace(nodeA).getCounters().nOutInterests, 57); // FIXME #3830
 }
 
 BOOST_FIXTURE_TEST_CASE(Nack, AsfGridFixture)
