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

Fix some ancient and incorrect error handling code

This commit is contained in:
Evan Phoenix 2015-08-03 22:09:17 -07:00
parent 6bffcf75ab
commit 2562379635

View file

@ -189,12 +189,13 @@ module Puma
pool << client
end
rescue SystemCallError
# nothing
rescue Errno::ECONNABORTED
# client closed the socket even before accept
io.close rescue nil
end
end
end
rescue Errno::ECONNABORTED
# client closed the socket even before accept
client.close rescue nil
rescue Object => e
@events.unknown_error self, e, "Listen loop"
end
@ -320,12 +321,13 @@ module Puma
pool.wait_until_not_full unless queue_requests
end
rescue SystemCallError
# nothing
rescue Errno::ECONNABORTED
# client closed the socket even before accept
io.close rescue nil
end
end
end
rescue Errno::ECONNABORTED
# client closed the socket even before accept
client.close rescue nil
rescue Object => e
@events.unknown_error self, e, "Listen loop"
end