keith-cullen / FreeCoAP

An implementation of a CoAP client, a CoAP server and a HTTP/CoAP proxy with full DTLS support.
132 stars 38 forks source link

Improved the handling of DTLS and socket errors #21

Closed PalmaITEM closed 6 years ago

PalmaITEM commented 6 years ago

In unstable links with losses and latency (this was tested with a quite constrained VHF link) several EAGAIN (or GNUTLS_E_AGAIN) and GNUTLS_E_INTERRUPTED may occur.

This leads to a failure in establishing a connection and to a complete stop in the server if the DTLS handshake fails.

According to the documentation, these interrupts should basically lead to another recv/read.

PalmaITEM commented 6 years ago

sorry for the mess, I'll create a cleaner PR