Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Commit

Permalink
Merge pull request #12 from avvo/broberts/fix-timeout
Browse files Browse the repository at this point in the history
Broberts/fix timeout
  • Loading branch information
brirob1113 committed May 29, 2017
2 parents d64d4cf + 41872a6 commit 30debac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion delsolr.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "delsolr"
s.version = "0.3.2"
s.version = "0.3.3"
s.authors = ["Ben VandenBos"]
s.date = %q{2009-11-02}
s.description = "Ruby wrapper for Lucene Solr"
Expand Down
5 changes: 3 additions & 2 deletions lib/delsolr/client.rb
Expand Up @@ -153,7 +153,9 @@ def query(request_handler, opts = {})

if body.blank? # cache miss (or wasn't enabled)
response = begin
connection.post("#{configuration.path}/select", query_builder.request_string)
connection.post("#{configuration.path}/select", query_builder.request_string) do | req |
req.options.timeout = configuration.timeout
end
rescue Faraday::ClientError => e
raise ConnectionError, e.message
end
Expand Down Expand Up @@ -268,7 +270,6 @@ def pending_documents
def connection_block
@connection_block ||= lambda do |faraday|
faraday.adapter Faraday.default_adapter
faraday.options[:timeout] = configuration.timeout
end
end

Expand Down

0 comments on commit 30debac

Please sign in to comment.