Yuriy Zhilovets 8 жил өмнө
parent
commit
c6920d6371
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      telegram.pl

+ 1 - 1
telegram.pl

@@ -46,7 +46,7 @@ Mojo::IOLoop->next_tick(sub
   $int = AnyEvent->signal(signal => "INT", cb => \&terminate);
   $hup = AnyEvent->signal(signal => "HUP", cb => \&terminate);
 
-  $config->{rabbit}->on_error(sub { $log->error(@_); terminate(); });
+  $config->{rabbit}->{on_error} = sub { $log->error(@_); terminate() };
   $rabbit = new rabbit_async($config->{rabbit}, sub
   {
     $rabbit->listen_queue($config->{queue}, $config->{bind}, \&incoming_message);