X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Flive.cpp;fp=src%2Fbin%2Flttng-relayd%2Flive.cpp;h=e0d446b2a1a4ee25cdc25539c870a87f52a1ef91;hp=5925642f09837ce7a421c095a3992abc1fc82424;hb=14e34907ffbc9645f8ed799b74e04d9c850df4f0;hpb=fe88e51751c3846b91592a7d52cb975f9c0f5de4 diff --git a/src/bin/lttng-relayd/live.cpp b/src/bin/lttng-relayd/live.cpp index 5925642f0..e0d446b2a 100644 --- a/src/bin/lttng-relayd/live.cpp +++ b/src/bin/lttng-relayd/live.cpp @@ -1266,7 +1266,12 @@ int viewer_get_new_streams(struct relay_connection *conn) LTTNG_VIEWER_SEEK_BEGINNING, &nb_total, &nb_unsent, &nb_created, &closed); if (ret < 0) { - goto error_unlock_session; + /* + * This is caused by an internal error; propagate the negative + * 'ret' to close the connection. + */ + response.status = htobe32(LTTNG_VIEWER_NEW_STREAMS_ERR); + goto send_reply; } send_streams = 1; response.status = htobe32(LTTNG_VIEWER_NEW_STREAMS_OK); @@ -1321,10 +1326,6 @@ end_put_session: } error: return ret; -error_unlock_session: - pthread_mutex_unlock(&session->lock); - session_put(session); - return ret; } /*