4
Fork 0

Fixed reconnect issue

This commit is contained in:
R3ABM Artem 2016-08-04 21:35:16 +03:00
parent 55bbf89f60
commit 4010ddcde3

View file

@ -585,6 +585,10 @@ int main(int argc, const char* argv[])
outgoingBuffer->length = htole16(SHA256_DIGEST_LENGTH);
sendto(uplinkHandle, outgoingBuffer, sizeof(struct RewindData) + SHA256_DIGEST_LENGTH, 0, serverAddress->ai_addr, serverAddress->ai_addrlen);
socketOptionValue = true;
setsockopt(remoteHandle, IPPROTO_IP, IP_PKTINFO, &socketOptionValue, sizeof(socketOptionValue));
continue;
}
@ -797,10 +801,6 @@ int main(int argc, const char* argv[])
break;
}
// SIGHUP
socketOptionValue = true;
setsockopt(remoteHandle, IPPROTO_IP, IP_PKTINFO, &socketOptionValue, sizeof(socketOptionValue));
}
}
}