From 47db877039d61ff28d2c3ce121acaed47e55b437 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Tue, 21 Aug 2018 13:32:13 +0100 Subject: [PATCH] ssl_write_record: Consider setting flush variable only if unset --- library/ssl_tls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index e888812f6..e4ea5c2bc 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -3381,7 +3381,8 @@ int mbedtls_ssl_write_record( mbedtls_ssl_context *ssl, uint8_t force_flush ) } #if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) + if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && + flush == SSL_DONT_FORCE_FLUSH ) { size_t remaining; ret = ssl_get_remaining_payload_in_datagram( ssl );