Skip to content

Commit fad689e

Browse files
florincorasDave Barach
authored andcommitted
tls: set flag whenever app session is freed
Type: fix Signed-off-by: Florin Coras <[email protected]> Change-Id: I3d44ff851da00573343e15712284af3b9c3912e3
1 parent 77680ae commit fad689e

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/vnet/tls/tls.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ tls_notify_app_accept (tls_ctx_t * ctx)
216216
{
217217
TLS_DBG (1, "failed to allocate fifos");
218218
session_free (app_session);
219+
ctx->no_app_session = 1;
219220
return rv;
220221
}
221222
ctx->app_session_handle = session_handle (app_session);
@@ -455,12 +456,15 @@ tls_session_reset_callback (session_t * s)
455456
tls_disconnect_transport (ctx);
456457
}
457458
else
458-
if ((app_session =
459-
session_get_if_valid (ctx->c_s_index, ctx->c_thread_index)))
460459
{
461-
session_free (app_session);
462-
ctx->c_s_index = SESSION_INVALID_INDEX;
463-
tls_disconnect_transport (ctx);
460+
app_session = session_get_if_valid (ctx->c_s_index, ctx->c_thread_index);
461+
if (app_session)
462+
{
463+
session_free (app_session);
464+
ctx->c_s_index = SESSION_INVALID_INDEX;
465+
ctx->no_app_session = 1;
466+
tls_disconnect_transport (ctx);
467+
}
464468
}
465469
}
466470

0 commit comments

Comments
 (0)