[riot-notifications] [RIOT-OS/RIOT] net/nanocoap: don't abort server on recv error (#11071)

Ken Bannister notifications at github.com
Tue Feb 26 18:54:34 CET 2019


### Contribution description
As reported in #10972, the nanocoap_server example becomes unresponsive after receiving a payload greater than 256 bytes long. This issue is caused by the nanocoap_server() function exiting on an any error to sock_udp_recv().

This PR fixes the issue by dropping the packet and resuming listening, rather than exiting the server. After review of the function documentation of sock_udp_recv(), I don't see a situation in which exiting the server is useful in this context. However, I did add debug logging of the error value.

### Testing procedure
See #10972. Thanks @jcarrano for the well written report!

### Issues/PRs references
Fixes #10972
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/11071

-- Commit Summary --

  * net/nanocoap: don't abort server on recv error

-- File Changes --

    M sys/net/application_layer/nanocoap/sock.c (3)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11071.patch
https://github.com/RIOT-OS/RIOT/pull/11071.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11071
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190226/24e9ba61/attachment.html>


More information about the notifications mailing list