mirror of
https://gitee.com/willfree/mlsr.git
synced 2026-10-04 19:42:02 +08:00
增加发送hello兴趣包时的错误处理
This commit is contained in:
1 parent
d109b3dc07
commit
bd1b4e318f
1 file changed
+6
-2
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user