X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-comm.c;h=dd8822cf13138a22053a7f04c2a143cbde556ad1;hb=451d66b27efb332bd16f79dcee374b6a2c85186f;hp=1720bca9cdbbe07f457ee34f22b6e69a5dfd7f2b;hpb=c362addf1c50e1d3202a26ff96738b71b4f9a531;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 1720bca9..dd8822cf 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -459,7 +459,7 @@ int setup_local_apps(void) } /* - * Get notify_sock timeout, in ms. + * Get socket timeout, in ms. * -1: wait forever. 0: don't wait. >0: timeout, in ms. */ static @@ -479,12 +479,20 @@ long get_timeout(void) return constructor_delay_ms; } +/* Timeout for notify socket send and recv. */ static long get_notify_sock_timeout(void) { return get_timeout(); } +/* Timeout for connecting to cmd and notify sockets. */ +static +long get_connect_sock_timeout(void) +{ + return get_timeout(); +} + /* * Return values: -1: wait forever. 0: don't wait. 1: timeout wait. */ @@ -1367,7 +1375,8 @@ restart: * first connect registration message. */ /* Connect cmd socket */ - ret = ustcomm_connect_unix_sock(sock_info->sock_path); + ret = ustcomm_connect_unix_sock(sock_info->sock_path, + get_connect_sock_timeout()); if (ret < 0) { DBG("Info: sessiond not accepting connections to %s apps socket", sock_info->name); prev_connect_failed = 1; @@ -1423,7 +1432,8 @@ restart: ust_unlock(); /* Connect notify socket */ - ret = ustcomm_connect_unix_sock(sock_info->sock_path); + ret = ustcomm_connect_unix_sock(sock_info->sock_path, + get_connect_sock_timeout()); if (ret < 0) { DBG("Info: sessiond not accepting connections to %s apps socket", sock_info->name); prev_connect_failed = 1;