Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Fixes an SSL / TLS socket blocking problem #80

Closed
wants to merge 1 commit into from

Conversation

peterson79
Copy link

@peterson79 peterson79 commented Oct 9, 2017

I don't know why the "MBEDTLS_ERR_SSL_TIMEOUT" is thrown after a connection has succeeded. However, the "do nothing" loop in combination with this error in "wlan_socket_recv" was causing the socket to block even when the timeout was set to 0. Catching this error and returning zero bytes on a non-blocking ssl socket seems to work. I tested this quickly with a self signed cert on a node.js server...

If this seems too "hacky" then mbedtls needs debugged and modified appropriately. The mbedtls code is wrapped up in a library at the moment so the source is not readily available in the tree...

@danicampora
Copy link

Looks good, thanks!

@danicampora
Copy link

Merged!

Xykon pushed a commit that referenced this pull request Feb 4, 2020
X-Ryl669 pushed a commit to X-Ryl669/pycom-micropython-sigfox that referenced this pull request May 12, 2023
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.

2 participants