]> git.openstreetmap.org Git - rails.git/commitdiff
Attempt to make timeouts work properly
authorTom Hughes <tom@compton.nu>
Mon, 29 Jan 2024 19:37:59 +0000 (19:37 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 29 Jan 2024 19:37:59 +0000 (19:37 +0000)
app/controllers/api_controller.rb
app/controllers/application_controller.rb

index 7e1b06a8dd3bbde8f7cc6c7bbc538e205e65937d..75db7f73bc757ff600bb59b0d9608c4ccdadaebd 100644 (file)
@@ -177,7 +177,7 @@ class ApiController < ApplicationController
   ##
   # wrap an api call in a timeout
   def api_call_timeout(&block)
-    Timeout.timeout(Settings.api_timeout, Timeout::Error, &block)
+    Timeout.timeout(Settings.api_timeout, &block)
   rescue ActionView::Template::Error => e
     e = e.cause
 
index c830d4bcd37bbce3177e80dd295cb4067bae8299..0a7df0994c9fc23f5c452ed2bb62dfc291b88aa6 100644 (file)
@@ -199,7 +199,7 @@ class ApplicationController < ActionController::Base
   ##
   # wrap a web page in a timeout
   def web_timeout(&block)
-    Timeout.timeout(Settings.web_timeout, Timeout::Error, &block)
+    Timeout.timeout(Settings.web_timeout, &block)
   rescue ActionView::Template::Error => e
     e = e.cause