Browse Source

Improved error handling.

Martin Edenhofer 10 years ago
parent
commit
7870d501f7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/search_index_backend.rb

+ 1 - 1
lib/search_index_backend.rb

@@ -240,7 +240,7 @@ return true if backend is configured
   end
 
   def self.connection( url )
-    conn = Faraday.new( :url => url )
+    conn = Faraday.new( :url => url, :options => { :open_timeout => 5, :timeout => 10 } )
     user = Setting.get('es_user')
     pw   = Setting.get('es_password')
     if user && !user.empty? && pw && !pw.empty?