mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibProtocol: Exit fatally if the connection to RequestServer disappears
The default implementation of die() causes the client process to simply exit cleanly. This prevents any tests from recognizing that something went wrong, as the process exits with a code of 0. With this patch, we still just exit when the connection dies, but with a fatal signal. In the future, we will want to launch a new RequestServer process and re-establish client connections.
This commit is contained in:
parent
fdd2f9ebbd
commit
d1ec32e28f
Notes:
sideshowbarker
2024-07-17 01:00:06 +09:00
Author: https://github.com/trflynn89
Commit: d1ec32e28f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/79
2 changed files with 9 additions and 0 deletions
|
@ -14,6 +14,13 @@ RequestClient::RequestClient(NonnullOwnPtr<Core::LocalSocket> socket)
|
|||
{
|
||||
}
|
||||
|
||||
void RequestClient::die()
|
||||
{
|
||||
// FIXME: Gracefully handle this, or relaunch and reconnect to RequestServer.
|
||||
warnln("\033[31;1mLost connection to RequestServer\033[0m");
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
void RequestClient::ensure_connection(URL::URL const& url, ::RequestServer::CacheLevel cache_level)
|
||||
{
|
||||
async_ensure_connection(url, cache_level);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue