1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:57:35 +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:
Aliaksandr Kalenik 2023-03-06 01:45:30 +03:00 committed by Tim Flynn
parent 0905fd57e4
commit 5c117cdcec
2 changed files with 3 additions and 1 deletions

View file

@ -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));