mirror of
https://github.com/moonlight-stream/GS-IPv6-Forwarder.git
synced 2025-07-01 07:15:36 +00:00
Fix crash when toggling GameStream on
This commit is contained in:
parent
4c94ecfce1
commit
e0db902f7d
@ -1007,9 +1007,14 @@ int Run(bool standaloneExe)
|
|||||||
switch (WaitForMultipleObjects(2, objects, FALSE, 120 * 1000)) {
|
switch (WaitForMultipleObjects(2, objects, FALSE, 120 * 1000)) {
|
||||||
case WAIT_OBJECT_0:
|
case WAIT_OBJECT_0:
|
||||||
// Interface state changed. Update pinholes immediately.
|
// Interface state changed. Update pinholes immediately.
|
||||||
|
ResetLogFile(standaloneExe);
|
||||||
|
printf("Woke up for network interface change\n");
|
||||||
break;
|
break;
|
||||||
case WAIT_OBJECT_0 + 1:
|
case WAIT_OBJECT_0 + 1:
|
||||||
// GameStream state changed
|
// GameStream state changed
|
||||||
|
ResetLogFile(standaloneExe);
|
||||||
|
printf("Woke up for GameStream state change\n");
|
||||||
|
|
||||||
ResetEvent(gameStreamStateChangeEvent);
|
ResetEvent(gameStreamStateChangeEvent);
|
||||||
|
|
||||||
// Shutdown all relay sockets to trigger the relay threads to terminate.
|
// Shutdown all relay sockets to trigger the relay threads to terminate.
|
||||||
@ -1039,12 +1044,13 @@ int Run(bool standaloneExe)
|
|||||||
break;
|
break;
|
||||||
case WAIT_TIMEOUT:
|
case WAIT_TIMEOUT:
|
||||||
// Time to refresh the pinholes
|
// Time to refresh the pinholes
|
||||||
|
ResetLogFile(standaloneExe);
|
||||||
|
printf("Woke up on refresh timer\n");
|
||||||
break;
|
break;
|
||||||
case WAIT_FAILED:
|
case WAIT_FAILED:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResetLogFile(standaloneExe);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user