tls: fix cleanup on app close with data 41/31741/2
authorFlorin Coras <fcoras@cisco.com>
Wed, 24 Mar 2021 07:02:49 +0000 (00:02 -0700)
committerFlorin Coras <florin.coras@gmail.com>
Wed, 24 Mar 2021 15:15:34 +0000 (15:15 +0000)
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I35b5ae5a58ab38cc4328f9f438938fab4fbd7942

src/plugins/tlsopenssl/tls_openssl.c

index a10372d..4278c34 100644 (file)
@@ -386,6 +386,9 @@ openssl_ctx_write_tls (tls_ctx_t *ctx, session_t *app_session,
 
 check_tls_fifo:
 
+  if (PREDICT_FALSE (ctx->app_closed && BIO_ctrl_pending (oc->rbio) <= 0))
+    openssl_confirm_app_close (ctx);
+
   /* Deschedule and wait for deq notification if fifo is almost full */
   enq_buf = clib_min (svm_fifo_size (ts->tx_fifo) / 2, TLSO_MIN_ENQ_SPACE);
   if (space < wrote + enq_buf)