From 9585700876b8f875a1089ada64dbb6b7aa52cede Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Sun, 1 Dec 2024 15:04:39 +0000 Subject: [PATCH] LibWeb: Don't try to wait for HTTP server to exit if kill call fails --- UI/Headless/Fixture.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/UI/Headless/Fixture.cpp b/UI/Headless/Fixture.cpp index 8e4d97e106b..d17281e599b 100644 --- a/UI/Headless/Fixture.cpp +++ b/UI/Headless/Fixture.cpp @@ -92,15 +92,11 @@ void HttpEchoServerFixture::teardown_impl() if (auto kill_or_error = Core::System::kill(m_process->pid(), SIGINT); kill_or_error.is_error()) { if (kill_or_error.error().code() != ESRCH) { warnln("Failed to kill HTTP echo server, error: {}", kill_or_error.error()); - m_process = {}; - return; + } else if (auto termination_or_error = m_process->wait_for_termination(); termination_or_error.is_error()) { + warnln("Failed to terminate HTTP echo server, error: {}", termination_or_error.error()); } } - if (auto termination_or_error = m_process->wait_for_termination(); termination_or_error.is_error()) { - warnln("Failed to terminate HTTP echo server, error: {}", termination_or_error.error()); - } - m_process = {}; }