Skip to content

Commit

Permalink
http_connection: rescue errors coming from CONNECT. (#336)
Browse files Browse the repository at this point in the history
Fix: #302.
  • Loading branch information
crondaemon committed Mar 31, 2020
1 parent 3a6712b commit 1d1f82f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/em-http/http_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ def parent=(p)
end

def receive_data(data)
@parent.receive_data data
begin
@parent.receive_data data
rescue EventMachine::Connectify::CONNECTError => e
@parent.close(e.message)
end
end

def connection_completed
Expand Down

0 comments on commit 1d1f82f

Please sign in to comment.