[client] don't report a spice error on graceful shutdown

This commit is contained in:
Geoffrey McRae 2021-12-30 21:02:53 +11:00
parent d43126f433
commit c8b4787cb1
2 changed files with 12 additions and 8 deletions

View File

@ -769,15 +769,15 @@ int main_frameThread(void * unused)
int spiceThread(void * arg) int spiceThread(void * arg)
{ {
while(g_state.state != APP_STATE_SHUTDOWN) while(g_state.state != APP_STATE_SHUTDOWN)
if (!purespice_process(100)) {
PSStatus status;
if ((status = purespice_process(100)) != PS_STATUS_RUN)
{ {
if (g_state.state != APP_STATE_SHUTDOWN) if (status != PS_STATUS_SHUTDOWN)
{
g_state.state = APP_STATE_SHUTDOWN;
DEBUG_ERROR("failed to process spice messages"); DEBUG_ERROR("failed to process spice messages");
}
break; break;
} }
}
if (g_state.audioDev) if (g_state.audioDev)
{ {
@ -1041,12 +1041,16 @@ static int lg_run(void)
} }
while(g_state.state != APP_STATE_SHUTDOWN && !purespice_ready()) while(g_state.state != APP_STATE_SHUTDOWN && !purespice_ready())
if (!purespice_process(1000)) {
PSStatus status;
if ((status = purespice_process(1000)) != PS_STATUS_RUN)
{ {
g_state.state = APP_STATE_SHUTDOWN; g_state.state = APP_STATE_SHUTDOWN;
DEBUG_ERROR("Failed to process spice messages"); if (status != PS_STATUS_SHUTDOWN)
DEBUG_ERROR("Failed to process spice messages");
return -1; return -1;
} }
}
purespice_mouseMode(true); purespice_mouseMode(true);
if (!lgCreateThread("spiceThread", spiceThread, NULL, &t_spice)) if (!lgCreateThread("spiceThread", spiceThread, NULL, &t_spice))

@ -1 +1 @@
Subproject commit a9664f731ab720ff890c35225f271048addfd54d Subproject commit d1f86f739974851afc5f98e13ea74ba6c96f805b