+ if (!session->current_trace_chunk) {
+ /*
+ * Session is either being destroyed or it never had a trace
+ * chunk created against it.
+ */
+ DBG("Session requested by live client has no current trace chunk, returning unknown session");
+ response.status = htobe32(LTTNG_VIEWER_ATTACH_UNK);
+ goto send_reply;
+ }