lib/main_loop/loop.rb in main_loop-0.1.2.16854 vs lib/main_loop/loop.rb in main_loop-0.1.3.16874

- old
+ new

@@ -27,11 +27,11 @@ exit!(2) # :nocov: end def start_loop_forever(timeout = 0) - wait = [timeout, 10].min + wait = [[(timeout / 2.5), 5].min, 5].max Timeouter.loop(timeout) do event = @bus.gets(wait) logger.debug("command:#{event}") case event @@ -47,10 +47,10 @@ logger.debug('Empty event: reaping...') else logger.debug("unknown event:#{event}") end - @dispatcher.reap(reap_children) + @dispatcher.reap(reap_children) rescue nil @dispatcher.tick end end # :nocov: