From c37e55335c8b56e764d4a5cfc3bd92c4ba302ee5 Mon Sep 17 00:00:00 2001 From: tb <> Date: Wed, 26 Oct 2022 20:31:38 +0000 Subject: dtlstest: Ensure the timeouts are at least 10 ms. This makes these tests a bit less flaky if the machine is otherwise under load. from jsing --- src/regress/lib/libssl/dtls/dtlstest.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/regress/lib/libssl/dtls/dtlstest.c b/src/regress/lib/libssl/dtls/dtlstest.c index 3819039f82..2d0d6cf5e8 100644 --- a/src/regress/lib/libssl/dtls/dtlstest.c +++ b/src/regress/lib/libssl/dtls/dtlstest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dtlstest.c,v 1.16 2022/10/02 16:38:23 jsing Exp $ */ +/* $OpenBSD: dtlstest.c,v 1.17 2022/10/26 20:31:38 tb Exp $ */ /* * Copyright (c) 2020, 2021 Joel Sing * @@ -365,6 +365,12 @@ poll_timeout(SSL *client, SSL *server) if (DTLSv1_get_timeout(server, &timeout)) server_timeout = timeout.tv_sec * 1000 + timeout.tv_usec / 1000; + if (client_timeout < 10) + client_timeout = 10; + if (server_timeout < 10) + server_timeout = 10; + + /* XXX */ if (client_timeout <= 0) return server_timeout; if (client_timeout > 0 && server_timeout <= 0) -- cgit v1.2.3-55-g6feb