Skip to content

Commit

Permalink
no need to unsubscribe from error event
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 1, 2013
1 parent d41ccd0 commit 4717de2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojo.pm
Expand Up @@ -18,7 +18,7 @@ has ua => sub {
# Fresh user agent
my $ua = Mojo::UserAgent->new->app($self);
weaken $self;
$ua->unsubscribe('error')->on(error => sub { $self->log->error(pop) });
$ua->on(error => sub { $self->log->error($_[1]) });
weaken $ua->{app};

return $ua;
Expand Down

0 comments on commit 4717de2

Please sign in to comment.