mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-11 11:20:40 +03:00
When an idle server (D)TLS session times out, no event is reported to a defined event handler. COAP_EVENT_DTLS_CLOSED is reported whenever there is a read / write issue, and this fix also reports the event COAP_EVENT_DTLS_CLOSED when the (D)TLS session is closed. Some extra code had to be added in to prevent event COAP_EVENT_DTLS_CLOSED being reported twice. src/coap_gnutls.c: src/coap_openssl.c: src/coap_tinydtls.c: Report event COAP_EVENT_DTLS_CLOSED when coap_dtls_free_session() and coap_tls_free_session() are called. src/coap_session.c: Do not log spurious (D)TLS Alert packets received after session is closed.