diff options
author | Yu Ping <ping.yu@intel.com> | 2020-02-19 02:31:22 +0800 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2020-02-19 02:56:43 +0000 |
commit | 837826169fd51c1d2bb7703e479447f5d4ffa9a5 (patch) | |
tree | 031c125e49ec8816f1d9a9eed81967c13a924b49 /src/vnet/tls | |
parent | b9f1f1587504bc8c7db11ce637b20185588dbc16 (diff) |
tls: handle disconect and reset in async mode
Type: fix
When async is enabled and request is inflight, delay close oepration
Change-Id: I713078fe9832c1599e8860fc0a6bb98588f20943
Signed-off-by: Yu Ping <ping.yu@intel.com>
Diffstat (limited to 'src/vnet/tls')
-rw-r--r-- | src/vnet/tls/tls.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c index c2616fdde23..257f48cd9ba 100644 --- a/src/vnet/tls/tls.c +++ b/src/vnet/tls/tls.c @@ -358,15 +358,22 @@ tls_session_reset_callback (session_t * s) session_t *app_session; ctx = tls_ctx_get (s->opaque); + ctx->is_passive_close = 1; tc = &ctx->connection; if (tls_ctx_handshake_is_over (ctx)) { session_transport_reset_notify (tc); session_transport_closed_notify (tc); + tls_disconnect_transport (ctx); + } + else + if ((app_session = + session_get_if_valid (ctx->c_s_index, ctx->c_thread_index))) + { + session_free (app_session); + ctx->c_s_index = SESSION_INVALID_INDEX; + tls_disconnect_transport (ctx); } - else if ((app_session = session_get (tc->s_index, tc->thread_index))) - session_free (app_session); - tls_disconnect_transport (ctx); } int |