From 3507f23cec212506da3c6836dbb159df4b41439f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Tue, 4 Dec 2018 17:15:02 +0100 Subject: Fix gnutls_handshake_set_timeout() for values < 1000 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit handshake-timeout.c now tests for <1000ms timeout and for >=1000ms timeout. The test duration decreased from 45s to 1.2s. Signed-off-by: Tim Rühsen --- lib/state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/state.c') diff --git a/lib/state.c b/lib/state.c index a60544737a..392183c95f 100644 --- a/lib/state.c +++ b/lib/state.c @@ -430,7 +430,8 @@ void _gnutls_handshake_internal_state_clear(gnutls_session_t session) _gnutls_epoch_gc(session); - session->internals.handshake_endtime = 0; + session->internals.handshake_endtime.tv_sec = 0; + session->internals.handshake_endtime.tv_nsec = 0; session->internals.handshake_in_progress = 0; session->internals.tfo.connect_addrlen = 0; -- cgit v1.2.1