Skip to content

Commit

Permalink
Fix ArgumentError when starting persistent HTTP client
Browse files Browse the repository at this point in the history
We don't really need to start its connection. Closes #7158
  • Loading branch information
p0deje committed May 3, 2019
1 parent a25638d commit 6b069e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rb/lib/selenium/webdriver/remote/http/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,15 @@ def http
http.open_timeout = open_timeout
http.read_timeout = read_timeout if read_timeout

http.start
start(http)
http
end
end

def start(http)
http.start
end

MAX_RETRIES = 3

def request(verb, url, headers, payload, redirects = 0)
Expand Down
4 changes: 4 additions & 0 deletions rb/lib/selenium/webdriver/remote/http/persistent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def close

private

def start(*)
# no need to explicitly start connection
end

def new_http_client
proxy = nil

Expand Down

4 comments on commit 6b069e2

@dluong777
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @p0deje so i wonder if these commit has been released with specific 'selenium-webdriver' version ? I have tried with the latest of 3.142 , which is 3.142.3 but seems like the fix hasn't been there. Should i wait for another minor version or is it included in v4.0.0 alpha versions ? Thanks.

@p0deje
Copy link
Member Author

@p0deje p0deje commented on 6b069e2 Jun 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It hasn't been released yet and will go into 4.0.0.alpha3. We can probably backport to 3.x branch too if there is a need for that. Please, let me know.

@dluong777
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just wanna prepare our test tools in terms of Selenium 4.0 era so just wanna update our code using this gem from v3.6.0 till v3.142.3 to see if any updates should have been made before migrating it to v4.0. I think it's good to have a release for this for 3.x if you don't mind. Thanks a lot.

@twalpole
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you’re not actually specifying to use the Persistent client class this will have no effect

Please sign in to comment.