mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-09 01:56:21 +00:00
Kernel+Tests: Don't panic when LocalSocket is already bound
This commit is contained in:
committed by
Andreas Kling
parent
b365356eba
commit
2de9ffa632
@@ -162,7 +162,8 @@ ErrorOr<void> LocalSocket::bind(Credentials const& credentials, Userspace<sockad
|
||||
|
||||
ErrorOr<void> LocalSocket::connect(Credentials const& credentials, OpenFileDescription& description, Userspace<sockaddr const*> user_address, socklen_t address_size)
|
||||
{
|
||||
VERIFY(!m_bound);
|
||||
if (m_bound)
|
||||
return set_so_error(EISCONN);
|
||||
|
||||
if (address_size > sizeof(sockaddr_un))
|
||||
return set_so_error(EINVAL);
|
||||
|
||||
Reference in New Issue
Block a user