From b7d9790fc2cb46cd3cced283c61ac2d6f6f531f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 15 May 2023 14:18:39 +0200 Subject: [PATCH] unix: accept() shouldn't return B_TIMEOUT but B_WOULD_BLOCK it's already handled when breaking the loop. Change-Id: I47aa8105ff32e97aa4e1c0b2e9292e4516ee155a Reviewed-on: https://review.haiku-os.org/c/haiku/+/6456 Reviewed-by: waddlesplash --- src/add-ons/kernel/network/protocols/unix/UnixEndpoint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/add-ons/kernel/network/protocols/unix/UnixEndpoint.cpp b/src/add-ons/kernel/network/protocols/unix/UnixEndpoint.cpp index a53e9a741e..745a0197f6 100644 --- a/src/add-ons/kernel/network/protocols/unix/UnixEndpoint.cpp +++ b/src/add-ons/kernel/network/protocols/unix/UnixEndpoint.cpp @@ -419,7 +419,7 @@ UnixEndpoint::Accept(net_socket **_acceptedSocket) error = acquire_sem_etc(fAcceptSemaphore, 1, B_ABSOLUTE_TIMEOUT | B_CAN_INTERRUPT, timeout); if (error < B_OK) - RETURN_ERROR(error); + break; locker.Lock(); error = gSocketModule->dequeue_connected(socket, _acceptedSocket);