X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c9f9ade96fef0e058704bd8583eb44dddff9965e..75e135869e26a1aeae93f3334668de01c3bb2f69:/app/controllers/api/amf_controller.rb diff --git a/app/controllers/api/amf_controller.rb b/app/controllers/api/amf_controller.rb index c05a13098..fc8a304bb 100644 --- a/app/controllers/api/amf_controller.rb +++ b/app/controllers/api/amf_controller.rb @@ -128,11 +128,9 @@ module Api [-2, "An unusual error happened (in #{call}). The server said: #{e}"] end - def amf_handle_error_with_timeout(call, rootobj, rootid) + def amf_handle_error_with_timeout(call, rootobj, rootid, &block) amf_handle_error(call, rootobj, rootid) do - OSM::Timer.timeout(Settings.api_timeout, OSM::APITimeoutError) do - yield - end + OSM::Timer.timeout(Settings.api_timeout, OSM::APITimeoutError, &block) end end