Permalink
Browse files

Minor cleanup, use IOError instead of EOFError

  • Loading branch information...
1 parent dac774e commit cd83b2f3046ca9e0f1685e0121a2fe5d9b7829d5 @evanphx evanphx committed Aug 11, 2012
Showing with 4 additions and 11 deletions.
  1. +2 −9 lib/puma/reactor.rb
  2. +2 −2 lib/puma/server.rb
View
@@ -45,24 +45,17 @@ def run
@app_pool << c
sockets.delete c
end
+
# The client doesn't know HTTP well
rescue HttpParserError => e
c.close
sockets.delete c
- if c.timeout_at
- @timeouts.delete c
- end
-
@events.parse_error @server, c.env, e
- rescue EOFError => e
+ rescue IOError => e
c.close
sockets.delete c
-
- if c.timeout_at
- @timeouts.delete c
- end
end
end
end
View
@@ -208,7 +208,7 @@ def run(background=true)
rescue HttpParserError => e
client.close
@events.parse_error self, client.env, e
- rescue EOFError
+ rescue IOError
client.close
else
if process_now
@@ -318,7 +318,7 @@ def process_client(client)
end
# The client disconnected while we were reading data
- rescue EOFError, SystemCallError => e
+ rescue IOError, SystemCallError => e
# Swallow them. The ensure tries to close +client+ down
# The client doesn't know HTTP well

0 comments on commit cd83b2f

Please sign in to comment.