mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Be sure to cleanup and close bad client sockets
This commit is contained in:
parent
44c8c1ab50
commit
e13d9ba9e9
2 changed files with 4 additions and 0 deletions
|
@ -36,6 +36,9 @@ module Puma
|
|||
end
|
||||
# The client doesn't know HTTP well
|
||||
rescue HttpParserError => e
|
||||
c.close
|
||||
sockets.delete c
|
||||
|
||||
@events.parse_error @server, c.env, e
|
||||
|
||||
rescue EOFError
|
||||
|
|
|
@ -205,6 +205,7 @@ module Puma
|
|||
begin
|
||||
process_now = client.eagerly_finish
|
||||
rescue HttpParserError => e
|
||||
client.close
|
||||
@events.parse_error self, client.env, e
|
||||
rescue EOFError
|
||||
client.close
|
||||
|
|
Loading…
Add table
Reference in a new issue