mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03: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
Notes:
sideshowbarker
2024-07-16 22:31:12 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/34224c42ef Pull-request: https://github.com/SerenityOS/serenity/pull/18009 Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/awesomekling
@ -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…
Reference in New Issue
Block a user