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) {
{
int ret = 0;
ssize_t send_ret;
- struct relay_session *session;
+ struct relay_session *session = NULL;
struct lttcomm_relayd_status_session reply;
char session_name[LTTNG_NAME_MAX];
char hostname[LTTNG_HOST_NAME_MAX];
send_ret);
ret = -1;
}
-
+ if (ret < 0 && session) {
+ session_put(session);
+ }
return ret;
}
rotate_pending = true;
DBG("Stream %" PRIu64 " is still rotating",
stream->stream_handle);
- } else if (stream->current_chunk_id.value < chunk_id) {
+ } else if (stream->current_chunk_id.value <= chunk_id) {
/*
* Stream closed on the consumer but still active on the
* relay.
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) {