mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Minor cleanup, use IOError instead of EOFError
This commit is contained in:
parent
dac774e74d
commit
cd83b2f304
2 changed files with 4 additions and 11 deletions
|
@ -45,24 +45,17 @@ module Puma
|
|||
@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
|
||||
|
|
|
@ -208,7 +208,7 @@ module Puma
|
|||
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 @@ module Puma
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue