diff --git a/hello/HelloProtocol.go b/hello/HelloProtocol.go index 44b6c79..0ea8b79 100644 --- a/hello/HelloProtocol.go +++ b/hello/HelloProtocol.go @@ -137,10 +137,14 @@ func (hp *HelloProtocol) SendHelloInterest(neighbor *component.Identifier) { } // 将data发出去 hp.expressInterest(name, hp.mlsrConfig.GetInterestResendTime()) - common2.LogDebug("Sending HELLO interest: " + name.ToUri()) + common2.LogDebug("HelloProtocol Sending HELLO interest: " + name.ToUri()) } // 安排按照配置文件中的时间,若干秒后【默认一分钟】发送下一个hello兴趣包 - hp.m_scheduler.ScheduleTaskAfterDuration(hp.mlsrConfig.GetInfoInterestInterval(), 1). + _, err := hp.m_scheduler.ScheduleTaskAfterDuration(hp.mlsrConfig.GetInfoInterestInterval(), 1). Do(hp.SendHelloInterest, neighbor) + if err != nil { + common2.LogDebug("HelloProtocol ScheduleTask to send hello interest error. ") + return + } }