Skip to content

Commit ba73506

Browse files
authored
Merge pull request #39 from ajragusa/4656-AnyEvent-timer-falling-behind
4656 any event timer falling behind
2 parents 8acd1dd + 80bf738 commit ba73506

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

lib/GRNOC/RabbitMQ.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ use warnings;
5151

5252
use AnyEvent::RabbitMQ;
5353

54-
our $VERSION = '1.1.0';
54+
our $VERSION = '1.1.1';
5555

5656

5757
=head2 connect_to_rabbit

lib/GRNOC/RabbitMQ/Client.pm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ sub on_response_cb {
261261
}
262262

263263
&$cb(decode_json($body));
264+
#if the callback takes a long time to update the timers may get screwed up
265+
#we update the now_update to update it
266+
AnyEvent->now_update;
264267
} else {
265268
$self->logger->debug("I don't know what to do with corr_id: $corr_id");
266269
}

lib/GRNOC/RabbitMQ/Dispatcher.pm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,9 @@ sub handle_request{
348348
$var->{'body'}->{'payload'},
349349
$self->{'default_input_validators'},
350350
$state);
351-
351+
#if it took a long time to call the method it is possible the anyevent
352+
#timer is now screwed up this will refresh it
353+
AnyEvent->now_update;
352354
return 1;
353355
}
354356

perl-GRNOC-RabbitMQ.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Summary: GRNOC RabbitMQ Perl Libraries
22
Name: perl-GRNOC-RabbitMQ
3-
Version: 1.1.0
3+
Version: 1.1.1
44
Release: 1%{?dist}
55
License: APL 2.0
66
Group: Network

0 commit comments

Comments
 (0)