增加发送hello兴趣包时的错误处理

This commit is contained in:
free will committed 2022-07-15 11:05:13 +08:00
1 parent d109b3dc07
commit bd1b4e318f
1 file changed
+6 -2
+6 -2
View File
@@ -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
}
}