]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/amf_controller.rb
Remove link_to_if since it's in a clause with the same condition
[rails.git] / app / controllers / api / amf_controller.rb
index 5d45eb0704a754b2f52715e839a74a132207f2a9..34a8ff7f14df6e497fad98d64a33ed74e6cb59d6 100644 (file)
@@ -37,6 +37,8 @@
 
 module Api
   class AmfController < ApiController
 
 module Api
   class AmfController < ApiController
+    require "timeout"
+
     include Potlatch
 
     before_action :check_api_writable
     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
 
     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
 
       end
     end