From: William King Date: Tue, 7 Apr 2015 17:52:30 +0000 (-0700) Subject: FS-7060 More accurate logging, and improve handling of producer reconnect attempt... X-Git-Tag: v1.4.19~6^2~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b6a9efcaa609144416dd7290e95de32bead9311;p=thirdparty%2Ffreeswitch.git FS-7060 More accurate logging, and improve handling of producer reconnect attempt interval --- diff --git a/src/mod/event_handlers/mod_amqp/mod_amqp_producer.c b/src/mod/event_handlers/mod_amqp/mod_amqp_producer.c index 191ae8b124..136bbf4b48 100644 --- a/src/mod/event_handlers/mod_amqp/mod_amqp_producer.c +++ b/src/mod/event_handlers/mod_amqp/mod_amqp_producer.c @@ -394,15 +394,14 @@ void * SWITCH_THREAD_FUNC mod_amqp_producer_thread(switch_thread_t *thread, void amqp_empty_table); if (mod_amqp_log_if_amqp_error(amqp_get_rpc_reply(profile->conn_active->state), "Declaring exchange")) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Amqp reconnect successful- connected\n"); continue; } - } else { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Profile[%s] failed to connect with code(%d), sleeping for %dms\n", - profile->name, status, profile->reconnect_interval_ms); - switch_sleep(profile->reconnect_interval_ms * 1000); } - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Amqp reconnect successful- connected\n"); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Profile[%s] failed to connect with code(%d), sleeping for %dms\n", + profile->name, status, profile->reconnect_interval_ms); + switch_sleep(profile->reconnect_interval_ms * 1000); continue; }