Wait for a resync reply before trying to resync again

This commit is contained in:
Cameron Gutman 2014-03-29 21:55:42 -04:00 committed by Michelle Bergeron
parent 61909b373f
commit ddd3cb8da9

View File

@ -149,6 +149,7 @@ static void jitterThreadFunc(void* context) {
static void resyncThreadFunc(void* context) {
long long payload[2];
NVCTL_PACKET_HEADER header;
PNVCTL_PACKET_HEADER response;
int err;
header.type = PTYPE_RESYNC;
@ -174,6 +175,14 @@ static void resyncThreadFunc(void* context) {
return;
}
response = readNvctlPacket();
if (response == NULL) {
Limelog("Resync thread terminating #3\n");
listenerCallbacks->connectionTerminated(LastSocketError());
return;
}
Limelog("Resync complete\n");
PltClearEvent(&resyncEvent);
}
}