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

Somewhere along the way, the variable which held the new Client object in #handle_servers was changed from 'client' to 'c'. The rescue block, however, for Errno::ECONNABORTED continued to try to close 'client', rescuing ALL errors from that call and just returning nil. The simple fix, then, was to rename the 'c' variable to the more descriptive 'client', which means that the Errno::ECONNABORTED rescue will actually close the client.

This commit is contained in:
Mo Omer 2014-03-28 10:26:11 -05:00
parent fff90f33ba
commit a7eb617edc

View file

@ -185,8 +185,8 @@ module Puma
else
begin
if io = sock.accept_nonblock
c = Client.new io, nil
pool << c
client = Client.new io, nil
pool << client
end
rescue SystemCallError
end
@ -292,8 +292,8 @@ module Puma
else
begin
if io = sock.accept_nonblock
c = Client.new io, @binder.env(sock)
pool << c
client = Client.new io, @binder.env(sock)
pool << client
end
rescue SystemCallError
end
@ -732,8 +732,8 @@ module Puma
begin
if io = sock.accept_nonblock
count += 1
c = Client.new io, @binder.env(sock)
@thread_pool << c
client = Client.new io, @binder.env(sock)
@thread_pool << client
end
rescue SystemCallError
end