]> git.lttng.org Git - lttng-tools.git/commitdiff
Fix: honor negative (unlimited) app socket timeout
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 4 Oct 2016 21:00:17 +0000 (17:00 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 5 Oct 2016 22:30:58 +0000 (18:30 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/main.c

index c8e4e538640afa560fa3af8bb9c14ceb1ebf5284..fb659b7e02d31a21168dfda4c15332fb8486514f 100644 (file)
@@ -2243,10 +2243,12 @@ static void *thread_registration_apps(void *data)
                                         * lttcomm_setsockopt_snd_timeout expect msec as
                                         * parameter.
                                         */
-                                       (void) lttcomm_setsockopt_rcv_timeout(sock,
-                                                       app_socket_timeout * 1000);
-                                       (void) lttcomm_setsockopt_snd_timeout(sock,
-                                                       app_socket_timeout * 1000);
+                                       if (app_socket_timeout >= 0) {
+                                               (void) lttcomm_setsockopt_rcv_timeout(sock,
+                                                               app_socket_timeout * 1000);
+                                               (void) lttcomm_setsockopt_snd_timeout(sock,
+                                                               app_socket_timeout * 1000);
+                                       }
 
                                        /*
                                         * Set the CLOEXEC flag. Return code is useless because
This page took 0.034486 seconds and 4 git commands to generate.