Module: HttpThreshold::RequestHold

Defined in:
lib/http_threshold/request_holder.rb

Instance Method Summary collapse

Instance Method Details

#exec(sock, ver, path) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/http_threshold/request_holder.rb', line 4

def exec(sock, ver, path)
  host = @header["host"].first
  # here can stop the request
  HttpThreshold::Client.sleep_until_allowed(host) do
    super
  end
end