Do not warn on terminating the server

If the server is already dead, terminating it fails. This is expected.
This commit is contained in:
Romain Vimont 2020-03-29 00:49:08 +01:00
parent a346bb80f4
commit 94e1696869

View file

@ -382,9 +382,7 @@ server_start(struct server *server, const char *serial,
server->wait_server_thread = server->wait_server_thread =
SDL_CreateThread(run_wait_server, "wait-server", server); SDL_CreateThread(run_wait_server, "wait-server", server);
if (!server->wait_server_thread) { if (!server->wait_server_thread) {
if (!cmd_terminate(server->process)) { cmd_terminate(server->process);
LOGW("Could not terminate server");
}
cmd_simple_wait(server->process, NULL); // ignore exit code cmd_simple_wait(server->process, NULL); // ignore exit code
goto error2; goto error2;
} }
@ -464,9 +462,7 @@ server_stop(struct server *server) {
assert(server->process != PROCESS_NONE); assert(server->process != PROCESS_NONE);
if (!cmd_terminate(server->process)) { cmd_terminate(server->process);
LOGW("Could not terminate server");
}
if (server->tunnel_enabled) { if (server->tunnel_enabled) {
// ignore failure // ignore failure