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

Default queue_requests to true in server.rb

This commit is contained in:
Emanuel Rietveld 2015-01-20 15:46:33 +01:00
parent f56ed3c4b8
commit 6da7a1fe39
2 changed files with 6 additions and 6 deletions

View file

@ -27,7 +27,6 @@ module Puma
@options[:after_worker_boot] ||= []
@options[:worker_timeout] ||= DefaultWorkerTimeout
@options[:worker_shutdown_timeout] ||= DefaultWorkerShutdownTimeout
@options[:queue_requests] ||= true
end
attr_reader :options

View file

@ -74,6 +74,7 @@ module Puma
@leak_stack_on_error = true
@options = options
@queue_requests = options[:queue_requests].nil? ? true : options[:queue_requests]
ENV['RACK_ENV'] ||= "development"
@ -241,7 +242,7 @@ module Puma
process_now = false
begin
if @options[:queue_requests]
if @queue_requests
process_now = client.eagerly_finish
else
client.finish
@ -266,7 +267,7 @@ module Puma
@thread_pool.clean_thread_locals = @options[:clean_thread_locals]
if @options[:queue_requests]
if @queue_requests
@reactor = Reactor.new self, @thread_pool
@reactor.run_in_thread
end
@ -302,7 +303,7 @@ module Puma
if io = sock.accept_nonblock
client = Client.new io, @binder.env(sock)
pool << client
pool.wait_until_not_full unless @options[:queue_requests]
pool.wait_until_not_full unless @queue_requests
end
rescue SystemCallError
end
@ -319,7 +320,7 @@ module Puma
@events.fire :state, @status
graceful_shutdown if @status == :stop || @status == :restart
if @options[:queue_requests]
if @queue_requests
@reactor.clear! if @status == :restart
@reactor.shutdown
end
@ -375,7 +376,7 @@ module Puma
close_socket = false
return
when true
return unless @options[:queue_requests]
return unless @queue_requests
buffer.reset
unless client.reset(@status == :run)