]> granicus.if.org Git - esp-idf/commit
Remove check for would_block in mbedtls
authorKedar Sovani <kedars@gmail.com>
Mon, 6 Aug 2018 06:06:40 +0000 (11:36 +0530)
committerVikram Dattu <vikram.dattu@espressif.com>
Thu, 17 Oct 2019 11:06:18 +0000 (16:36 +0530)
commit87c3decc1255edced1348841866b49324533d152
tree449bbdce2f9a8a8f9fee42dca9b4a8d5593a462b
parentacf114895db78dcfa7e53226efb25b84d5c88f49
Remove check for would_block in mbedtls

Basically, in the portability layer, it is checked if the socket is
NON-block, and if not, then even the EAGAIN and EWOULDBLOCK errors are
diverted to a RECV error. This causes a problem for sockets with
receive timeouts set. When such a timeout is set, the condition for
NON_BLOCK isn't met and hence a hard error is returned.

Searching for EAGAIN and EWOULDBLOCK in lwip returns only 3 results
(accept, recvfrom, close) and all of them look to be genuine cases for
EWOULDBLOCK. So removing this check to make receive timeout with TLS
work.
components/mbedtls/port/net_sockets.c