Skip to content

Commit

Permalink
LibWeb: Don't try to wait for HTTP server to exit if kill call fails
Browse files Browse the repository at this point in the history
  • Loading branch information
tcl3 authored and gmta committed Dec 20, 2024
1 parent a450d64 commit 9585700
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions UI/Headless/Fixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
}

Expand Down

0 comments on commit 9585700

Please sign in to comment.