]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
write to the socket if there's data to write
authorAlan T. DeKok <aland@freeradius.org>
Sun, 16 Oct 2022 12:55:13 +0000 (08:55 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 16 Oct 2022 13:07:33 +0000 (09:07 -0400)
src/main/tls_listen.c

index 5995fa390ad1a026bd80adb6942e99d03ae07a91..83856c6159c4ffad14eec15d6ce7b7e20052d748 100644 (file)
@@ -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);