projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Docs: move notification thread documentation to header
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
live.c
diff --git
a/src/bin/lttng-relayd/live.c
b/src/bin/lttng-relayd/live.c
index 9e1085f33615018237a4acd2abd434c2362c265b..f00270bea4c84ab4727047594443191e028965ef 100644
(file)
--- a/
src/bin/lttng-relayd/live.c
+++ b/
src/bin/lttng-relayd/live.c
@@
-654,12
+654,16
@@
void *thread_dispatcher(void *data)
health_code_update();
health_code_update();
-
while (!CMM_LOAD_SHARED(live_dispatch_thread_exit)
) {
+
for (;;
) {
health_code_update();
/* Atomically prepare the queue futex */
futex_nto1_prepare(&viewer_conn_queue.futex);
health_code_update();
/* Atomically prepare the queue futex */
futex_nto1_prepare(&viewer_conn_queue.futex);
+ if (CMM_LOAD_SHARED(live_dispatch_thread_exit)) {
+ break;
+ }
+
do {
health_code_update();
do {
health_code_update();
@@
-1174,10
+1178,13
@@
static int check_index_status(struct relay_viewer_stream *vstream,
{
int ret;
{
int ret;
- if (
trace->session->connection_closed
+ if (
(trace->session->connection_closed || rstream->closed)
&& rstream->index_received_seqcount
== vstream->index_sent_seqcount) {
&& rstream->index_received_seqcount
== vstream->index_sent_seqcount) {
- /* Last index sent and session connection is closed. */
+ /*
+ * Last index sent and session connection or relay
+ * stream are closed.
+ */
index->status = htobe32(LTTNG_VIEWER_INDEX_HUP);
goto hup;
} else if (rstream->beacon_ts_end != -1ULL &&
index->status = htobe32(LTTNG_VIEWER_INDEX_HUP);
goto hup;
} else if (rstream->beacon_ts_end != -1ULL &&
This page took
0.025165 seconds
and
4
git commands to generate.