[MQTTsrc] add log messages when connection lost
authorHyoung Joo Ahn <hello.ahn@samsung.com>
Wed, 12 May 2021 11:12:48 +0000 (20:12 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 13 May 2021 02:18:49 +0000 (11:18 +0900)
Since the `cause` of cb_connection_lost is always null, IMO, we need to guide user to check the log messages of the broker

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
gst/mqtt/mqttsrc.c

index 5ecde40..b7ec2d4 100644 (file)
@@ -971,7 +971,8 @@ cb_mqtt_on_connection_lost (void *context, char *cause)
   g_cond_broadcast (&self->mqtt_src_gcond);
   if (!self->err) {
     self->err = g_error_new (self->gquark_err_tag, EHOSTDOWN,
-        "Connection to the host (broker) has been lost: %s",
+        "Connection to the host (broker) has been lost: %s \n"
+        "\t\tfor detail, please check the log message of the broker",
         g_strerror (EHOSTDOWN));
   }
   g_mutex_unlock (&self->mqtt_src_mutex);