forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: sockets: Fix recv() not being interrupted on close()
In case recv() call was waiting for data, and the socket was closed from another thread, the recv() call would not be interrupted, causing the receiving thread to be blocked indefinitely. Fix this, by signalling the condvar the recv() call is waiting on close(). Additionally, close will now set the socket into error mode, with EINTR as the error condition, allowing the blocked calls to recognise that the call was interrupted, and return a proper error code on the event. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
- Loading branch information
Showing
1 changed file
with
18 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters