mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb+WebContent: Add IPC to re-establish RequestServer connections
This commit is contained in:
committed by
Andreas Kling
parent
6f4be4791a
commit
b1b218596f
Notes:
github-actions[bot]
2025-08-10 09:04:11 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/b1b218596f8 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5796
@@ -215,7 +215,13 @@ ErrorOr<void> WebSocket::establish_web_socket_connection(URL::URL const& url_rec
|
||||
|
||||
additional_headers.set("User-Agent", ResourceLoader::the().user_agent().to_byte_string());
|
||||
|
||||
m_websocket = ResourceLoader::the().request_client().websocket_connect(url_record, origin_string, protocol_byte_strings, {}, additional_headers);
|
||||
auto request_client = ResourceLoader::the().request_client();
|
||||
|
||||
// FIXME: We could put this request in a queue until the client connection is re-established.
|
||||
if (!request_client)
|
||||
return Error::from_string_literal("RequestServer is currently unavailable");
|
||||
|
||||
m_websocket = request_client->websocket_connect(url_record, origin_string, protocol_byte_strings, {}, additional_headers);
|
||||
|
||||
m_websocket->on_open = [weak_this = make_weak_ptr<WebSocket>()] {
|
||||
if (!weak_this)
|
||||
|
||||
Reference in New Issue
Block a user