Skip to content

Commit

Permalink
use monotonic clock for Hypnotoad
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 27, 2013
1 parent ae00982 commit 922f744
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Mojo/Server/Hypnotoad.pm
Expand Up @@ -62,7 +62,8 @@ sub run {
}

# Start accepting connections
local $SIG{USR2} = sub { $self->{upgrade} ||= time };
local $SIG{USR2}
= sub { $self->{upgrade} ||= $prefork->ioloop->reactor->time };
$prefork->run;
}

Expand Down Expand Up @@ -123,7 +124,8 @@ sub _manage {

# Timeout
kill 'KILL', $self->{new}
if $self->{upgrade} + $self->{upgrade_timeout} <= time;
if $self->{upgrade} + $self->{upgrade_timeout}
<= $self->{prefork}->ioloop->reactor->time;
}
}

Expand Down

0 comments on commit 922f744

Please sign in to comment.