mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
Kernel+Tests: Don't panic when LocalSocket is already bound
This commit is contained in:
parent
b365356eba
commit
2de9ffa632
2 changed files with 32 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue