1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

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

This commit is contained in:
Evan Phoenix 2012-09-09 19:51:36 -07:00
parent f316cf6bc6
commit e9a0b5e615
2 changed files with 4 additions and 3 deletions

View file

@ -48,7 +48,7 @@ module Puma
@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 @@ module Puma
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 file

@ -237,7 +237,7 @@ module Puma
when true
buffer.reset
unless client.reset
unless client.reset(@status == :run)
close_socket = false
client.set_timeout @persistent_timeout
@reactor.add client