diff options
author | Simon Zhang <yuwei1.zhang@intel.com> | 2020-01-14 18:11:18 +0800 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2020-01-15 06:15:32 +0000 |
commit | 989c3c8fbd46ca0a8d9f6d6be3008e1285f3155e (patch) | |
tree | 7db98718b7a00d3b4675f722f3646fd7660c738b /src | |
parent | c95eefb393d05167ce6e35e5617179f536de0bda (diff) |
tls: add picotls session close process
Type: fix
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: If0a1691c1435f2826c8c83f8bc52e4cd3ecc6256
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/tlspicotls/tls_picotls.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/tlspicotls/tls_picotls.c b/src/plugins/tlspicotls/tls_picotls.c index 7f1979422fe..d475e9cf71d 100644 --- a/src/plugins/tlspicotls/tls_picotls.c +++ b/src/plugins/tlspicotls/tls_picotls.c @@ -206,7 +206,13 @@ picotls_transport_close (tls_ctx_t * ctx) static int picotls_app_close (tls_ctx_t * ctx) { - picotls_confirm_app_close (ctx); + session_t *app_session; + + app_session = session_get_from_handle (ctx->app_session_handle); + if (!svm_fifo_max_dequeue_cons (app_session->tx_fifo)) + picotls_confirm_app_close (ctx); + else + ctx->app_closed = 1; return 0; } @@ -492,6 +498,9 @@ picotls_ctx_write (tls_ctx_t * ctx, session_t * app_session) tls_add_vpp_q_tx_evt (tls_session); tls_add_vpp_q_builtin_tx_evt (app_session); + if (ctx->app_closed) + picotls_app_close (ctx); + return 0; } |