LibWeb: Don't try to wait for HTTP server to exit if kill call fails

This commit is contained in:
Tim Ledbetter 2024-12-01 15:04:39 +00:00 committed by Jelle Raaijmakers
commit 9585700876
Notes: github-actions[bot] 2024-12-20 14:00:48 +00:00

View file

@ -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 = {};
}