Skip to content

Commit

Permalink
no need to sleep all the time
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 12, 2017
1 parent 54ce301 commit 254fbcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Morbo/Backend/Poll.pm
Expand Up @@ -6,7 +6,6 @@ use Mojo::File 'path';
sub modified_files {
my $self = shift;

sleep $self->watch_timeout;
my $cache = $self->{cache} ||= {};
my @files;
for my $file (map { -f $_ && -r _ ? $_ : _list($_) } @{$self->watch}) {
Expand All @@ -17,6 +16,7 @@ sub modified_files {
@$stats = ($mtime, $size);
push @files, $file;
}
sleep $self->watch_timeout unless @files;

return \@files;
}
Expand Down

0 comments on commit 254fbcd

Please sign in to comment.