Skip to content

Commit

Permalink
Merge pull request #386 from bugsnag/v6/net-http
Browse files Browse the repository at this point in the history
Merge pull request #380 from dexhorthy/net-http-proxy
  • Loading branch information
Cawllec authored Nov 9, 2017
2 parents 7c973a6 + 659c22e commit fabcf69
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/bugsnag/delivery/synchronous.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ def deliver(url, body, configuration)

def request(url, body, configuration)
uri = URI.parse(url)
http = Net::HTTP.new(uri.host, uri.port, configuration.proxy_host, configuration.proxy_port, configuration.proxy_user, configuration.proxy_password)

if configuration.proxy_host
http = Net::HTTP.new(uri.host, uri.port, configuration.proxy_host, configuration.proxy_port, configuration.proxy_user, configuration.proxy_password)
else
http = Net::HTTP.new(uri.host, uri.port)
end

http.read_timeout = configuration.timeout
http.open_timeout = configuration.timeout

Expand Down

0 comments on commit fabcf69

Please sign in to comment.