mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 02:08:12 +03:00
Kernel: connect() should EISCONN on already-connected LocalSocket
This was causing us to try and accept the same client socket multiple times on the server side, tripping an assertion in Socket::accept().
This commit is contained in:
parent
21517f693d
commit
0596ab880e
Notes:
sideshowbarker
2024-07-19 10:14:30 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/0596ab880e4
@ -105,6 +105,8 @@ KResult LocalSocket::connect(FileDescription& description, const sockaddr* addre
|
||||
return KResult(-EINVAL);
|
||||
if (address->sa_family != AF_LOCAL)
|
||||
return KResult(-EINVAL);
|
||||
if (is_connected())
|
||||
return KResult(-EISCONN);
|
||||
|
||||
const sockaddr_un& local_address = *reinterpret_cast<const sockaddr_un*>(address);
|
||||
char safe_address[sizeof(local_address.sun_path) + 1] = { 0 };
|
||||
|
Loading…
Reference in New Issue
Block a user