Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

[nrf noup] zephyr: Handle socket close #141

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

krish2718
Copy link
Collaborator

fixup! [nrf noup] zephyr: Add support for WPA CLI zephyr

In some cases we are receving zero bytes from the socket continuously this causes an infinite loop and starving other threads (even SHELL thread).

So, treat 0 bytes recv as EoF as its a connected socket and unregister from eloop to avoid infinite loop of recv failures.

fixup! [nrf noup] zephyr: Add support for WPA CLI zephyr

In some cases (interface is disabled) the control interface socket is
closed but as we don't handle EoF control interface keeps receiving
zero bytes from the socket continuously and this causes an infinite
loop and starving other threads (even SHELL thread).

So, treat 0 bytes recv as EoF as its a connected socket and unregister
from eloop to avoid infinite loop of recv failures.

Fixes SHEL-2320.

Signed-off-by: Chaitanya Tata <[email protected]>
@krish2718 krish2718 merged commit d8d1d6d into nrfconnect:main Dec 18, 2023
1 check passed
@krish2718 krish2718 deleted the wpas_recv_loop branch December 18, 2023 10:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants