From 2d0dab79aa578b46b2c4f21a8a731edb3c2fd1cd Mon Sep 17 00:00:00 2001 From: Dan Doyle Date: Thu, 16 Jul 2020 18:37:45 +0000 Subject: [PATCH] Properly account for RMQ reconnects in Push code, improve error message --- lib/GRNOC/TSDS/DataService/Push.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/GRNOC/TSDS/DataService/Push.pm b/lib/GRNOC/TSDS/DataService/Push.pm index 981c9d5..9510a75 100644 --- a/lib/GRNOC/TSDS/DataService/Push.pm +++ b/lib/GRNOC/TSDS/DataService/Push.pm @@ -150,6 +150,7 @@ sub add_data { if (! $rabbit || ! $rabbit->is_connected()){ $self->_connect_rabbit() || return; + $rabbit = $self->{'rabbit'}; } # If this user is limited to sending data for specific things, @@ -163,7 +164,7 @@ sub add_data { # detect error if ( $@ ) { - $self->error( 'An error occurred publishing the data.' ); + $self->error( 'An error occurred publishing the data: ' . $@); return; }