Skip to content

Fix EAGAIN/EWOULDBLOCK check in AsyncUDPSocketTest recvmsg error handling#2600

Open
cuiweixie wants to merge 1 commit into
facebook:mainfrom
cuiweixie:fix-asyncudpsocket-test-errno-check
Open

Fix EAGAIN/EWOULDBLOCK check in AsyncUDPSocketTest recvmsg error handling#2600
cuiweixie wants to merge 1 commit into
facebook:mainfrom
cuiweixie:fix-asyncudpsocket-test-errno-check

Conversation

@cuiweixie

Copy link
Copy Markdown

Use && instead of || when checking errno. Since errno has a single value, (errno != EAGAIN || errno != EWOULDBLOCK) is always true. The correct logic is to only report errors when errno is neither EAGAIN nor EWOULDBLOCK.

…ling

Use && instead of || when checking errno. Since errno has a single value,
(errno != EAGAIN || errno != EWOULDBLOCK) is always true. The correct logic
is to only report errors when errno is neither EAGAIN nor EWOULDBLOCK.
@meta-cla meta-cla Bot added the CLA Signed label Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant