diff --git a/lib/guard/listeners/linux.rb b/lib/guard/listeners/linux.rb index 6436d59..2d53b62 100644 --- a/lib/guard/listeners/linux.rb +++ b/lib/guard/listeners/linux.rb @@ -51,7 +51,7 @@ module Guard def watch_change @watch_change = true - while !@stop + until @stop if Config::CONFIG['build'] =~ /java/ || IO.select([inotify.to_io], [], [], latency) break if @stop diff --git a/lib/guard/listeners/polling.rb b/lib/guard/listeners/polling.rb index e0dd5ca..bf5a17b 100644 --- a/lib/guard/listeners/polling.rb +++ b/lib/guard/listeners/polling.rb @@ -23,7 +23,7 @@ module Guard private def watch_change - while !@stop + until @stop start = Time.now.to_f files = modified_files([Dir.pwd + '/'], :all => true) update_last_event