From d927ff632491b55f736879c4c5108b103aa3fe46 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Thu, 1 Aug 2024 19:14:16 +0200 Subject: [PATCH] Return infinity time from SSL_get_event_timeout when the connection is not started Reviewed-by: Neil Horman Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/25069) (cherry picked from commit b1f4aebb74192afb197487bf6f4998fbb87cd1c1) --- ssl/quic/quic_impl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index 8884cfb7f3f..f6ddba43c5d 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -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; -- 2.47.2