Fix Style/ExplicitBlockArgument warnings

This commit is contained in:
Tom Hughes 2020-08-09 18:45:01 +01:00
parent 2651db7254
commit 75e135869e
5 changed files with 12 additions and 33 deletions

View file

@ -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