From bd1b4e318f5a67600f6c2777cf5ebdc488cbd406 Mon Sep 17 00:00:00 2001 From: free will <2647778488@qq.com> Date: Fri, 15 Jul 2022 11:05:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=91=E9=80=81hello?= =?UTF-8?q?=E5=85=B4=E8=B6=A3=E5=8C=85=E6=97=B6=E7=9A=84=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hello/HelloProtocol.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 + } }