Elevate priorities for the UDP relay threads

This commit is contained in:
Cameron Gutman
2020-08-11 01:12:48 -07:00
parent b6508d9024
commit 944c8993e8
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -21,6 +21,9 @@ UdpRelayThreadProc(LPVOID Context)
PUDP_TUPLE tuple = (PUDP_TUPLE)Context;
SOCKADDR_IN lastRemoteAddr;
// Ensure the relay threads aren't preempted by games or other CPU intensive activity
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST);
RtlZeroMemory(&lastRemoteAddr, sizeof(lastRemoteAddr));
for (;;) {