mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-16 06:22:17 +00:00
WebDriver: Keep WebDriver socket listening until session end
WebDriver socket should not be closed as soon as first client got connected becaused there might more than one WebContent process spawned by browser.
This commit is contained in:
parent
0905fd57e4
commit
5c117cdcec
Notes:
sideshowbarker
2024-07-16 23:17:57 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 5c117cdcec
Pull-request: https://github.com/SerenityOS/serenity/pull/17733
Reviewed-by: https://github.com/linusg
Reviewed-by: https://github.com/trflynn89 ✅
2 changed files with 3 additions and 1 deletions
|
@ -70,7 +70,7 @@ ErrorOr<void> Session::start(LaunchBrowserCallbacks const& callbacks)
|
|||
auto promise = TRY(ServerPromise::try_create());
|
||||
|
||||
m_web_content_socket_path = DeprecatedString::formatted("{}/webdriver/session_{}_{}", TRY(Core::StandardPaths::runtime_directory()), getpid(), m_id);
|
||||
auto web_content_server = TRY(create_server(promise));
|
||||
m_web_content_server = TRY(create_server(promise));
|
||||
|
||||
if (m_options.headless)
|
||||
m_browser_pid = TRY(callbacks.launch_headless_browser(*m_web_content_socket_path));
|
||||
|
|
|
@ -67,6 +67,8 @@ private:
|
|||
|
||||
Optional<DeprecatedString> m_web_content_socket_path;
|
||||
Optional<pid_t> m_browser_pid;
|
||||
|
||||
RefPtr<Core::LocalServer> m_web_content_server;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue