From 09535c1bd412bd66f93723c2c1aa7aacc2e091c3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 5 Oct 2009 20:16:18 -0700 Subject: Thread* models: cleanup timeout management Ensure we reset the per-thread time Thread.current[:t] with each connection so we don't timeout long-lived connections. --- lib/rainbows/thread_spawn.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/rainbows/thread_spawn.rb') diff --git a/lib/rainbows/thread_spawn.rb b/lib/rainbows/thread_spawn.rb index 36968d8..af05476 100644 --- a/lib/rainbows/thread_spawn.rb +++ b/lib/rainbows/thread_spawn.rb @@ -44,10 +44,7 @@ module Rainbows rescue Errno::EINTR, Errno::ECONNABORTED next end - threads.add(Thread.new(c) { |c| - Thread.current[:t] = Time.now - process_client(c) - }) + threads.add(Thread.new(c) { |c| process_client(c) }) end end join_spawned_threads(threads) -- cgit v1.2.3-24-ge0c7