oc_tls: disable TLS close-notify server response
@@ -1454,7 +1454,8 @@ read_application_data(oc_tls_peer_t *peer)
OC_ERR("oc_tls: mbedtls_error: %s", buf);
#endif /* OC_DEBUG */
}
- if (peer->role == MBEDTLS_SSL_IS_SERVER) {
+ if (peer->role == MBEDTLS_SSL_IS_SERVER &&
+ (peer->endpoint.flags & TCP) == 0) {
mbedtls_ssl_close_notify(&peer->ssl_ctx);
}
oc_tls_free_peer(peer, false);
