Commit 554251d959 for openssl.org

commit 554251d95999579e9799497fb40f2d80179cedf6
Author: Liu Dongmiao <473522+liudongmiao@users.noreply.github.com>
Date:   Wed Nov 25 20:53:32 2026 +0800

    quic-openssl-docker: detect a closed connection when polling

    Polling the streams for SSL_POLL_EVENT_R does not report a closed
    connection, so when the connection closed before all responses
    arrived, the client polled in a busy loop until the runner killed the
    test. Exit with an error if the connection was closed before a poll
    and the poll finds no readable stream.

    Assisted-by: Claude:claude-opus-5-5
    Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
    Reviewed-by: Bob Beck <beck@openssl.org>
    Merge-date: Wed Dec  2 06:53:17 2026
    Merged-from: https://github.com/openssl/openssl/pull/33986

diff --git a/test/quic-openssl-docker/hq-interop/quic-hq-interop.c b/test/quic-openssl-docker/hq-interop/quic-hq-interop.c
index f332ff129a..b95f320e0a 100644
--- a/test/quic-openssl-docker/hq-interop/quic-hq-interop.c
+++ b/test/quic-openssl-docker/hq-interop/quic-hq-interop.c
@@ -936,6 +936,12 @@ int main(int argc, char *argv[])
      * Now poll all our descriptors for events
      */
     while (this_poll_count != 0 && poll_done < this_poll_count) {
+        int closed;
+        SSL_CONN_CLOSE_INFO cinfo;
+
+        /* A closed connection can still have unread data. */
+        closed = SSL_get_conn_close_info(ssl, &cinfo, sizeof(cinfo)) > 0;
+
         result_count = 0;
         poll_timeout.tv_sec = 0;
         poll_timeout.tv_usec = 0;
@@ -945,6 +951,11 @@ int main(int argc, char *argv[])
             goto end;
         }

+        if (closed && result_count == 0) {
+            fprintf(stderr, "Connection closed before all responses were received\n");
+            goto end;
+        }
+
         /* Iterate over our poll array looking for ready SSL's */
         for (poll_idx = 0; poll_idx < this_poll_count; poll_idx++) {
             /*