Skip to content

Commit

Permalink
add an example to the FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 21, 2015
1 parent e9518ff commit e92dbf0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/Mojolicious/Guides/FAQ.pod
Expand Up @@ -225,6 +225,16 @@ server closed the connection before the user agent could receive the whole
response or that the user agent got destroyed, which forces all connections to
be closed immediately.

# The user agent goes out of scope and gets destroyed
{
my $ua = Mojo::UserAgent->new;
$ua->get('mojolicio.us' => sub {
my ($ua, $tx) = @_;
...
});
}
Mojo::IOLoop->start unless Mojo::IOLoop->is_running;

=head2 What does "Worker 31842 has no heartbeat, restarting" mean?

As long as they are accepting new connections, worker processes of all built-in
Expand Down

0 comments on commit e92dbf0

Please sign in to comment.