tls: Receive only when the app_session is available

Type: fix

Signed-off-by: Saravanan Murugesan <sarmurug@cisco.com>
Change-Id: Icfd5e3c0bb034684c7bc43be46927294536ba08a
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c
index ec5f670..b91282c 100644
--- a/src/vnet/tls/tls.c
+++ b/src/vnet/tls/tls.c
@@ -513,6 +513,11 @@
     return 0;
 
   ctx = tls_ctx_get (tls_session->opaque);
+  if (PREDICT_FALSE (ctx->no_app_session))
+    {
+      TLS_DBG (1, "Local App closed");
+      return 0;
+    }
   tls_ctx_read (ctx, tls_session);
   return 0;
 }