diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-12-20 00:54:17 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-12-20 03:42:55 +0000 |
commit | 7e0dc42f7084e1719456a80b2e44049133c2e8b7 (patch) | |
tree | c9840f4eb56cc365664425b40b94978f43c40ed8 /lib/rainbows | |
parent | 886e0a006d9e8e9c586beae28ed4dc5097064e90 (diff) | |
download | rainbows-7e0dc42f7084e1719456a80b2e44049133c2e8b7.tar.gz |
This was causing unrelated requests to get killed every +timeout+ seconds, instead of only the ones that were running too long. Noticed-by: ghazel@gmail.com ref: http://mid.gmane.org/AANLkTi=7OhyTwkHsp_rXU7Gp1PokihiQ9bJigpO-BfN6@mail.gmail.com
Diffstat (limited to 'lib/rainbows')
-rw-r--r-- | lib/rainbows/thread_timeout.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rainbows/thread_timeout.rb b/lib/rainbows/thread_timeout.rb index b9f6025..18f400b 100644 --- a/lib/rainbows/thread_timeout.rb +++ b/lib/rainbows/thread_timeout.rb @@ -90,7 +90,7 @@ class Rainbows::ThreadTimeout now = Time.now @lock.synchronize do @active.delete_if do |thread, time| - time >= now and thread.raise(ExecutionExpired).nil? + now >= time and thread.raise(ExecutionExpired).nil? end end end while true |