X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-comm.c;h=34b930d284f891c96be11a87f1fd2ff4c924c307;hb=8f62fbe3204b1f7c6c91401c38f2d30cfc644906;hp=07c1be09eb46aa2f53903ebb91f42369c290aa87;hpb=a3b964ebc0510bacc9af2d729f1a68c2e3ccc95d;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 07c1be09..34b930d2 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -451,7 +451,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 @@ -471,12 +471,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. */ @@ -1351,7 +1359,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; @@ -1407,7 +1416,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;