aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vnet/tls/tls.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c
index 3096dd53106..996c20f2829 100644
--- a/src/vnet/tls/tls.c
+++ b/src/vnet/tls/tls.c
@@ -582,7 +582,6 @@ tls_session_connected_cb (u32 tls_app_index, u32 ho_ctx_index,
ctx->tls_session_handle = session_handle (tls_session);
tls_session->opaque = ctx_handle;
- tls_session->session_state = SESSION_STATE_READY;
if (tls_ctx_init_client (ctx))
{
@@ -590,6 +589,9 @@ tls_session_connected_cb (u32 tls_app_index, u32 ho_ctx_index,
tls_disconnect_transport (ctx);
}
+ if (tls_session->session_state < SESSION_STATE_READY)
+ tls_session->session_state = SESSION_STATE_READY;
+
return 0;
}