Skip to content

Commit e0db902

Browse files
committed
Fix crash when toggling GameStream on
1 parent 4c94ecf commit e0db902

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

GSv6Fwd/GSv6Fwd.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,9 +1007,14 @@ int Run(bool standaloneExe)
10071007
switch (WaitForMultipleObjects(2, objects, FALSE, 120 * 1000)) {
10081008
case WAIT_OBJECT_0:
10091009
// Interface state changed. Update pinholes immediately.
1010+
ResetLogFile(standaloneExe);
1011+
printf("Woke up for network interface change\n");
10101012
break;
10111013
case WAIT_OBJECT_0 + 1:
10121014
// GameStream state changed
1015+
ResetLogFile(standaloneExe);
1016+
printf("Woke up for GameStream state change\n");
1017+
10131018
ResetEvent(gameStreamStateChangeEvent);
10141019

10151020
// Shutdown all relay sockets to trigger the relay threads to terminate.
@@ -1039,12 +1044,13 @@ int Run(bool standaloneExe)
10391044
break;
10401045
case WAIT_TIMEOUT:
10411046
// Time to refresh the pinholes
1047+
ResetLogFile(standaloneExe);
1048+
printf("Woke up on refresh timer\n");
10421049
break;
10431050
case WAIT_FAILED:
10441051
return -1;
10451052
}
10461053

1047-
ResetLogFile(standaloneExe);
10481054
}
10491055

10501056
return 0;

0 commit comments

Comments
 (0)