]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Return infinity time from SSL_get_event_timeout when the connection is not started
authorTomas Mraz <tomas@openssl.org>
Thu, 1 Aug 2024 17:14:16 +0000 (19:14 +0200)
committerNeil Horman <nhorman@openssl.org>
Sat, 3 Aug 2024 13:18:11 +0000 (09:18 -0400)
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25069)

ssl/quic/quic_impl.c

index 8884cfb7f3ffff8a7bea576eac190c1f91d1d0a7..f6ddba43c5d3db0dd496047c7d611838cea9e244 100644 (file)
@@ -1088,8 +1088,9 @@ int ossl_quic_get_event_timeout(SSL *s, struct timeval *tv, int *is_infinite)
 
     quic_lock(ctx.qc);
 
-    deadline
-        = ossl_quic_reactor_get_tick_deadline(ossl_quic_channel_get_reactor(ctx.qc->ch));
+    if (ctx.qc->started)
+        deadline
+            = ossl_quic_reactor_get_tick_deadline(ossl_quic_channel_get_reactor(ctx.qc->ch));
 
     if (ossl_time_is_infinite(deadline)) {
         *is_infinite = 1;