Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit e9a0b5e615f400e07529101ae10442adc3f159f1 1 parent f316cf6
@evanphx evanphx authored
Showing with 4 additions and 3 deletions.
  1. +3 −2 lib/puma/client.rb
  2. +1 −1  lib/puma/server.rb
View
5 lib/puma/client.rb
@@ -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
2  lib/puma/server.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.