]> git.openstreetmap.org Git - rails.git/commitdiff
Set a timeout on HTTP requests made by the server
authorTom Hughes <tom@compton.nu>
Sun, 29 May 2022 09:54:39 +0000 (10:54 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 29 May 2022 09:55:06 +0000 (10:55 +0100)
lib/osm.rb

index 73513c3ad6d6f305cc70601222cc0a007a4e95b0..4241ad700a575c0bc9b6e088b97c1cf5137467fe 100644 (file)
@@ -520,7 +520,7 @@ module OSM
 
   # Return the HTTP client to use
   def self.http_client
-    @http_client ||= Faraday.new
+    @http_client ||= Faraday.new(:request => { :timeout => 15 })
   end
 
   # Return the MaxMindDB database handle