mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-20 15:09:42 +00:00
LibWeb+WebContent: Add IPC to re-establish RequestServer connections
This commit is contained in:
parent
6f4be4791a
commit
b1b218596f
Notes:
github-actions[bot]
2025-08-10 09:04:11 +00:00
Author: https://github.com/trflynn89
Commit: b1b218596f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5796
7 changed files with 65 additions and 13 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue