Correctly initialise WebPush connection (#2417)
The `ipaddr` arg here is being interpreted as a positional arg (since the keyword arg doesn't exist), which results in an invalid connection object. This was causing push notifications to silently fail. We should initialise the property on the object instead.
This commit is contained in:
@@ -20,7 +20,8 @@ module WebPush::PersistentRequest
|
||||
endpoint_ip = @options[:endpoint_ip]
|
||||
|
||||
if endpoint_ip
|
||||
http = Net::HTTP.new(uri.host, uri.port, ipaddr: endpoint_ip)
|
||||
http = Net::HTTP.new(uri.host, uri.port)
|
||||
http.ipaddr = endpoint_ip
|
||||
http.use_ssl = true
|
||||
http.ssl_timeout = @options[:ssl_timeout] unless @options[:ssl_timeout].nil?
|
||||
http.open_timeout = @options[:open_timeout] unless @options[:open_timeout].nil?
|
||||
|
||||
Reference in New Issue
Block a user