1
0
Fork 0
Browse Source

* комментарии

master
Alex 'AdUser' Z 10 years ago
parent
commit
25c2cbcd83
  1. 2
      lib/Livecam/Main.pm

2
lib/Livecam/Main.pm

@ -113,6 +113,7 @@ sub livecam {
$self->app->ua->get($url->to_abs); # setup cookies
$url->path('/camws/cam-image.php');
# handler
my $send_image = sub {
my $seed = sprintf "%.15f", rand(1);
$url->query(cam => $cam->{id}, r => $seed);
@ -135,6 +136,7 @@ sub livecam {
$send_image->(); # initial send
Mojo::IOLoop->stream($self->tx->connection)->timeout(30);
# log events inside timer's handler to main app log
Mojo::IOLoop->singleton->reactor->on(error => sub {
my ($reactor, $err) = @_;
$self->app->log->error($err);

Loading…
Cancel
Save