From f14bdba3e4e31f79d892bc048a5b476db6df24b9 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Sun, 16 Oct 2022 08:55:13 -0400 Subject: [PATCH] write to the socket if there's data to write --- src/main/tls_listen.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/tls_listen.c b/src/main/tls_listen.c index 5995fa390a..83856c6159 100644 --- a/src/main/tls_listen.c +++ b/src/main/tls_listen.c @@ -551,6 +551,17 @@ check_for_setup: * Try to get application data. */ get_application_data: + /* + * More data to send. Do so. + */ + if (sock->ssn->dirty_out.used > 0) { + rcode = tls_socket_write(listener, request); + if (rcode < 0) { + PTHREAD_MUTEX_UNLOCK(&sock->mutex); + return rcode; + } + } + status = tls_application_data(sock->ssn, request); RDEBUG3("(TLS) Application data status %d", status); -- 2.47.3