Fix: Wrong poll events on UST application socket
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index cedd35611c6ba4ecdca0039b2de79364a7f27dab..6bc8b00e914b1d1d6a15c6e82d2e0f520609afcc 100644 (file)
@@ -1192,12 +1192,12 @@ static void *thread_manage_apps(void *data)
                                                ust_app_unregister(ust_cmd.sock);
                                        } else {
                                                /*
-                                                * We just need here to monitor the close of the UST
-                                                * socket and poll set monitor those by default.
-                                                * Listen on POLLIN (even if we never expect any
-                                                * data) to ensure that hangup wakes us.
+                                                * We only monitor the error events of the socket. This
+                                                * thread does not handle any incoming data from UST
+                                                * (POLLIN).
                                                 */
-                                               ret = lttng_poll_add(&events, ust_cmd.sock, LPOLLIN);
+                                               ret = lttng_poll_add(&events, ust_cmd.sock,
+                                                               LPOLLERR & LPOLLHUP & LPOLLRDHUP);
                                                if (ret < 0) {
                                                        goto error;
                                                }
This page took 0.023438 seconds and 4 git commands to generate.