A relay daemon may be temporarily unavailable (e.g. not launched yet,
or simply a network error). In such a case, it is not necessary to
mark the consumer as bad since the error is not related to the
consumer daemon itself.
This change lets the user try to create a channel later without
having to restart the session and consumer daemons.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
/* Connect to relayd and make version check if uri is the control. */
ret = create_connect_relayd(relayd_uri, &rsock, consumer);
if (ret != LTTNG_OK) {
- goto error;
+ goto relayd_comm_error;
}
assert(rsock);
*/
close_sock:
- (void) relayd_close(rsock);
- free(rsock);
-
-error:
if (ret != LTTNG_OK) {
/*
* The consumer output for this session should not be used anymore
*/
consumer->enabled = 0;
}
+ (void) relayd_close(rsock);
+ free(rsock);
+
+relayd_comm_error:
return ret;
}