Wait 500ms for ARP/NDP to finish in resolve RPC

Fixes #318
This commit is contained in:
Srivats P 2022-06-06 16:26:42 +05:30
parent 1854f1ab9e
commit 81c975d6d1

View File

@ -39,6 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
#include "portmanager.h"
#include <QStringList>
#include <QThread>
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();
}