Skip to content

Commit

Permalink
Fix handling of server exceptions.
Browse files Browse the repository at this point in the history
If we've raised an exception in on_headers or on_body we don't want to
continue processing this request. We've already sent the reply back, we're
essentially processing a failed request at this point.

Check if we have terminated the request and skip processing if so.
  • Loading branch information
dj2 committed Jan 19, 2012
1 parent 340e8a0 commit cf93bbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/goliath/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def post_init
@pending.push(req)
end

req.process if !@parser.upgrade?
req.process if !@parser.upgrade? && !req.env[:terminate_connection]
end
end

Expand Down

0 comments on commit cf93bbb

Please sign in to comment.