Skip to content

Commit

Permalink
Fix some ancient and incorrect error handling code
Browse files Browse the repository at this point in the history
  • Loading branch information
evanphx committed Aug 4, 2015
1 parent 6bffcf7 commit 2562379
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/puma/server.rb
Expand Up @@ -189,12 +189,13 @@ def handle_servers_lopez_mode
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
Expand Down Expand Up @@ -320,12 +321,13 @@ def handle_servers
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
Expand Down

0 comments on commit 2562379

Please sign in to comment.