1
0
Fork 0
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:
Evan Phoenix 2012-07-23 17:08:11 -07:00
parent 44c8c1ab50
commit e13d9ba9e9
2 changed files with 4 additions and 0 deletions

View file

@ -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

View file

@ -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