X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/279787943e9f747e0e910600fc0e3003165c69b9..4f304e23018e9a1380e2374b9a8d419275d99c76:/app/controllers/api/amf_controller.rb diff --git a/app/controllers/api/amf_controller.rb b/app/controllers/api/amf_controller.rb index 5d45eb070..34a8ff7f1 100644 --- a/app/controllers/api/amf_controller.rb +++ b/app/controllers/api/amf_controller.rb @@ -37,6 +37,8 @@ module Api class AmfController < ApiController + require "timeout" + include Potlatch before_action :check_api_writable @@ -130,7 +132,7 @@ module Api 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, &block) + Timeout.timeout(Settings.api_timeout, OSM::APITimeoutError, &block) end end