mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
WebDriver: Unlink server socket before binding to it
Previously, the create_server function would fail with an "Address already in use" error if a file that used for socket address is already exists.
This commit is contained in:
parent
b76d3f287f
commit
34224c42ef
1 changed files with 2 additions and 0 deletions
|
@ -57,6 +57,8 @@ ErrorOr<NonnullRefPtr<Core::LocalServer>> Session::create_server(NonnullRefPtr<S
|
|||
{
|
||||
dbgln("Listening for WebDriver connection on {}", *m_web_content_socket_path);
|
||||
|
||||
(void)Core::System::unlink(*m_web_content_socket_path);
|
||||
|
||||
auto server = TRY(Core::LocalServer::try_create());
|
||||
server->listen(*m_web_content_socket_path);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue