logic: Enable early refresh

This commit enables the node to send a refresh interest before the previous interest expires.
This eliminates the time gap between interest expiration and new interest arrival

Change-Id: Ib70b4e75b8f525b4ac16a89a4646746fb6aa7282
Refs: #3883
This commit is contained in:
Sonu Mishra authored and Alex Afanasyev committed 2017-01-18 18:38:47 -08:00
1 parent 36eb3edb81
commit 0dadc57c60
1 file changed
+3 -2
+3 -2
View File
@@ -1,6 +1,6 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2012-2014 University of California, Los Angeles
* Copyright (c) 2012-2017 University of California, Los Angeles
*
* This file is part of ChronoSync, synchronization library for distributed realtime
* applications for NDN.
@@ -20,6 +20,7 @@
* @author Chaoyi Bian <bcy@pku.edu.cn>
* @author Alexander Afanasyev <http://lasr.cs.ucla.edu/afanasyev/index.html>
* @author Yingdi Yu <yingdi@cs.ucla.edu>
* @author Sonu Mishra <https://www.linkedin.com/in/mishrasonu>
*/
#include "logic.hpp"
@@ -608,7 +609,7 @@ Logic::sendSyncInterest()
#endif
EventId eventId =
m_scheduler.scheduleEvent(m_syncInterestLifetime +
m_scheduler.scheduleEvent(m_syncInterestLifetime / 2 +
ndn::time::milliseconds(m_reexpressionJitter()),
bind(&Logic::sendSyncInterest, this));
m_scheduler.cancelEvent(m_reexpressingInterestId);