Skip to content

Fix ESP8266 recv_udp timeout with flow control #8911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2018

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Nov 30, 2018

Description

UDP packets are always received as OOB data. Without checking for new OOB data with a call to "_process_oob" then recv_udp never blocks. If a UDP packet is not available then NSAPI_ERROR_WOULD_BLOCK is returned. This causes mbed-os's DNS handling to always fail when flow control is enabled.

This patch fixes recv_udp by always calling "_process_oob" regardless of if flow control is enabled. This ensures that recv_udp follows the timeout parameter and waits for new data to arrive.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

UDP packets are always received as OOB data. Without checking for
new OOB data with a call to "_process_oob" then recv_udp never blocks.
If a UDP packet is not available then NSAPI_ERROR_WOULD_BLOCK is
returned. This causes mbed-os's DNS handling to always fail when
flow control is enabled.

This patch fixes recv_udp by always calling "_process_oob" regardless
of if flow control is enabled. This ensures that recv_udp follows the
timeout parameter and waits for new data to arrive.
@cmonr
Copy link
Contributor

cmonr commented Dec 1, 2018

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 2, 2018

Test run: SUCCESS

Summary: 4 of 4 test jobs passed
Build number : 1
Build artifacts
Build logs

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 3, 2018

Test restarted, to confirm the issue - did not see this one yet (unicode python error), will confirm once completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants