Skip to content

Commit 5c117cd

Browse files
kalenikaliaksandrtrflynn89
authored andcommitted
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.
1 parent 0905fd5 commit 5c117cd

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Userland/Services/WebDriver/Session.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ ErrorOr<void> Session::start(LaunchBrowserCallbacks const& callbacks)
7070
auto promise = TRY(ServerPromise::try_create());
7171

7272
m_web_content_socket_path = DeprecatedString::formatted("{}/webdriver/session_{}_{}", TRY(Core::StandardPaths::runtime_directory()), getpid(), m_id);
73-
auto web_content_server = TRY(create_server(promise));
73+
m_web_content_server = TRY(create_server(promise));
7474

7575
if (m_options.headless)
7676
m_browser_pid = TRY(callbacks.launch_headless_browser(*m_web_content_socket_path));

Userland/Services/WebDriver/Session.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ class Session {
6767

6868
Optional<DeprecatedString> m_web_content_socket_path;
6969
Optional<pid_t> m_browser_pid;
70+
71+
RefPtr<Core::LocalServer> m_web_content_server;
7072
};
7173

7274
}

0 commit comments

Comments
 (0)