We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fee592 commit 3b65ecdCopy full SHA for 3b65ecd
lib/httpi/adapter/net_http_persistent.rb
@@ -12,7 +12,7 @@ class NetHTTPPersistent < NetHTTP
12
private
13
14
def create_client
15
- if version > 2
+ if Gem::Version.new(Net::HTTP::Persistent::VERSION) >= Gem::Version.new('3.0.0')
16
Net::HTTP::Persistent.new name: thread_key
17
else
18
Net::HTTP::Persistent.new thread_key
@@ -42,11 +42,6 @@ def setup_client
42
def thread_key
43
@request.url.host.split(/\W/).reject{|p|p == ""}.join('-')
44
end
45
-
46
- def version
47
- Net::HTTP::Persistent::VERSION.split('.')[0].to_i
48
- end
49
50
51
52
0 commit comments