From 81c975d6d144d6d844fba332db45df740dbaa7ff Mon Sep 17 00:00:00 2001 From: Srivats P Date: Mon, 6 Jun 2022 16:26:42 +0530 Subject: [PATCH] Wait 500ms for ARP/NDP to finish in resolve RPC Fixes #318 --- server/myservice.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/myservice.cpp b/server/myservice.cpp index 5abb767..a73eddd 100644 --- a/server/myservice.cpp +++ b/server/myservice.cpp @@ -39,6 +39,7 @@ along with this program. If not, see #include "portmanager.h" #include +#include extern Drone *drone; @@ -1168,8 +1169,12 @@ void MyService::resolveDeviceNeighbors( response->set_status(OstProto::Ack::kRpcError); response->set_notes(notes.toStdString()); } - else + else { + // XXX: allow time for ARP/ND to finish; if more time is required, + // the client should wait/check before invoking build() + QThread::msleep(500); response->set_status(OstProto::Ack::kRpcSuccess); + } done->Run(); }