ctx->app_session_handle = session_handle (app_session);
app_session->session_state = SESSION_STATE_READY;
- session_lookup_add_connection (&ctx->connection,
- session_handle (app_session));
return 0;
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