mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47:19 +00:00
[host] app: prevent double call to stopThreads
This commit is contained in:
parent
98ea8b0bb8
commit
9965a4a3a6
@ -599,7 +599,8 @@ int app_main(int argc, char * argv[])
|
|||||||
if (!captureRestart())
|
if (!captureRestart())
|
||||||
{
|
{
|
||||||
exitcode = LG_HOST_EXIT_FAILED;
|
exitcode = LG_HOST_EXIT_FAILED;
|
||||||
goto finish;
|
stopThreads();
|
||||||
|
goto fail_capture;
|
||||||
}
|
}
|
||||||
app.state = APP_STATE_RUNNING;
|
app.state = APP_STATE_RUNNING;
|
||||||
}
|
}
|
||||||
@ -626,20 +627,18 @@ int app_main(int argc, char * argv[])
|
|||||||
case CAPTURE_RESULT_ERROR:
|
case CAPTURE_RESULT_ERROR:
|
||||||
DEBUG_ERROR("Capture interface reported a fatal error");
|
DEBUG_ERROR("Capture interface reported a fatal error");
|
||||||
exitcode = LG_HOST_EXIT_FAILED;
|
exitcode = LG_HOST_EXIT_FAILED;
|
||||||
goto finish;
|
goto fail_capture;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (app.state != APP_STATE_SHUTDOWN)
|
if (app.state != APP_STATE_SHUTDOWN)
|
||||||
DEBUG_INFO("No subscribers, going to sleep...");
|
DEBUG_INFO("No subscribers, going to sleep...");
|
||||||
|
|
||||||
captureStop();
|
captureStop();
|
||||||
}
|
}
|
||||||
|
|
||||||
exitcode = app.exitcode;
|
exitcode = app.exitcode;
|
||||||
|
|
||||||
finish:
|
|
||||||
stopThreads();
|
|
||||||
|
|
||||||
fail_capture:
|
fail_capture:
|
||||||
lgTimerDestroy(app.lgmpTimer);
|
lgTimerDestroy(app.lgmpTimer);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user