[Redirector] Fix Socket Timeout

This commit is contained in:
AmazingDM
2021-10-15 01:11:11 +08:00
parent 9cd24b3df8
commit 07d4e92821

View File

@@ -23,7 +23,7 @@ void ProcessPacket(ENDPOINT_ID id, SOCKADDR_IN6 target, char* packet, int length
{
if (udpConn.Send(&dnsAddr, packet, length) == length)
{
timeval timeout;
timeval timeout{};
timeout.tv_sec = 4;
int size = udpConn.Read(NULL, buffer, sizeof(buffer), &timeout);