Permalink
Browse files

If trying to stop running, don't do the fast check

  • Loading branch information...
1 parent f316cf6 commit e9a0b5e615f400e07529101ae10442adc3f159f1 @evanphx evanphx committed Sep 10, 2012
Showing with 4 additions and 3 deletions.
  1. +3 −2 lib/puma/client.rb
  2. +1 −1 lib/puma/server.rb
View
@@ -48,7 +48,7 @@ def set_timeout(val)
@timeout_at = Time.now + val
end
- def reset
+ def reset(fast_check=true)
@parser.reset
@read_header = true
@env = @proto_env.dup
@@ -67,7 +67,8 @@ def reset
end
return false
- elsif IO.select([@to_io], nil, nil, FAST_TRACK_KA_TIMEOUT)
+ elsif fast_check &&
+ IO.select([@to_io], nil, nil, FAST_TRACK_KA_TIMEOUT)
return try_to_finish
end
end
View
@@ -237,7 +237,7 @@ def process_client(client, buffer)
when true
buffer.reset
- unless client.reset
+ unless client.reset(@status == :run)
close_socket = false
client.set_timeout @persistent_timeout
@reactor.add client

0 comments on commit e9a0b5e

Please sign in to comment.