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:
parent
6bffcf75ab
commit
2562379635
1 changed files with 8 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue