X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Flive.c;h=6c3e94f273f55afeb60da5597a4293c452bdc015;hb=5240ac615ee0089e1c65edd46cfe06033805bc3d;hp=5684608eacc6b72a86550dd0c70e007381922b12;hpb=8bdee6e2bac74a577147046126628ff3b1b34930;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c index 5684608ea..6c3e94f27 100644 --- a/src/bin/lttng-relayd/live.c +++ b/src/bin/lttng-relayd/live.c @@ -515,6 +515,11 @@ restart: revents = LTTNG_POLL_GETEV(&events, i); pollfd = LTTNG_POLL_GETFD(&events, i); + if (!revents) { + /* No activity for this FD (poll implementation). */ + continue; + } + /* Thread quit pipe has been closed. Killing thread. */ ret = check_thread_quit_pipe(pollfd, revents); if (ret) { @@ -1322,7 +1327,7 @@ int viewer_get_next_index(struct relay_connection *conn) ret = check_index_status(vstream, rstream, ctf_trace, &viewer_index); pthread_mutex_unlock(&rstream->viewer_stream_rotation_lock); if (ret < 0) { - goto end; + goto end_unlock; } else if (ret == 1) { /* * This means the viewer index data structure has been populated by the @@ -1950,6 +1955,11 @@ restart: health_code_update(); + if (!revents) { + /* No activity for this FD (poll implementation). */ + continue; + } + /* Thread quit pipe has been closed. Killing thread. */ ret = check_thread_quit_pipe(pollfd, revents); if (ret) {