summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gnutls_handshake.c6
-rw-r--r--lib/gnutls_state.c1
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index e835da1ac5..481bfa899f 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -2450,6 +2450,12 @@ gnutls_handshake (gnutls_session_t session)
if (session->internals.priorities.protocol.algorithms == 0)
return gnutls_assert_val(GNUTLS_E_NO_PRIORITIES_WERE_SET);
+ if (STATE == STATE0)
+ {
+ /* first call */
+ gettime(&session->internals.dtls.handshake_start_time);
+ }
+
if (session->internals.handshake_timeout_ms &&
session->internals.handshake_endtime == 0)
session->internals.handshake_endtime = gnutls_time(0) +
diff --git a/lib/gnutls_state.c b/lib/gnutls_state.c
index 3f768f7798..cfdf2df1f1 100644
--- a/lib/gnutls_state.c
+++ b/lib/gnutls_state.c
@@ -269,7 +269,6 @@ _gnutls_handshake_internal_state_init (gnutls_session_t session)
session->internals.dtls.hsk_read_seq = 0;
session->internals.dtls.hsk_write_seq = 0;
- gettime(&session->internals.dtls.handshake_start_time);
}
void