[client] fix hang when trying to terminate an unconnected client

This commit is contained in:
Geoffrey McRae 2020-01-27 12:25:47 +11:00
parent 6b2e78acdf
commit c1fd6552d2
2 changed files with 6 additions and 1 deletions

View file

@ -1 +1 @@
B1-118-g7b11ab04c6+1
B1-119-g6b2e78acdf+1

View file

@ -369,6 +369,8 @@ static int frameThread(void * unused)
SDL_SetThreadPriority(SDL_THREAD_PRIORITY_HIGH);
lgWaitEvent(e_startup, TIMEOUT_INFINITE);
if (!state.running)
return 0;
// subscribe to the frame queue
while(state.running)
@ -1504,7 +1506,10 @@ static void lg_shutdown()
state.running = false;
if (t_render)
{
lgSignalEvent(e_startup);
lgJoinThread(t_render, NULL);
}
lgmpClientFree(&state.lgmp);