Skip to content

Commit

Permalink
Rename @max_fast_inline to @max_keep_alive
Browse files Browse the repository at this point in the history
  • Loading branch information
MSP-Greg committed Oct 13, 2024
1 parent 96b0b32 commit c79864e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/puma/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ def prepare_response(status, headers, res_body, requests, client)
# This allows Puma to service connections fairly when the number
# of concurrent connections exceeds the size of the threadpool.
force_keep_alive = if @enable_keep_alives
client.requests_served < @max_fast_inline ||
@thread_pool.busy_threads < @max_threads
client.requests_served < @max_keep_alive
else
# Always set force_keep_alive to false if the server has keep-alives not enabled.
false
Expand Down Expand Up @@ -580,7 +579,7 @@ def fetch_status_code(status)
# response body
# @param io_buffer [Puma::IOBuffer] modified inn place
# @param force_keep_alive [Boolean] 'anded' with keep_alive, based on system
# status and `@max_fast_inline`
# status and `@max_keep_alive`
# @return [Hash] resp_info
# @version 5.0.3
#
Expand Down
2 changes: 1 addition & 1 deletion lib/puma/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def initialize(app, events = nil, options = {})
@min_threads = @options[:min_threads]
@max_threads = @options[:max_threads]
@queue_requests = @options[:queue_requests]
@max_fast_inline = @options[:max_fast_inline]
@max_keep_alive = @options[:max_fast_inline]
@enable_keep_alives = @options[:enable_keep_alives]
@enable_keep_alives &&= @queue_requests
@io_selector_backend = @options[:io_selector_backend]
Expand Down

0 comments on commit c79864e

Please sign in to comment.