class Typhoeus::Multi

def add(easy)

def add(easy)
  raise "trying to add easy handle twice" if @easy_handles.include?(easy)
  easy.set_headers() if easy.headers.empty?
  code = Curl.multi_add_handle(@handle, easy.handle)
  raise RuntimeError.new("An error occured adding the handle: #{code}: #{Curl.multi_strerror(code)}") if code != :call_multi_perform and code != :ok
  do_perform if code == :call_multi_perform
  @active += 1
  @easy_handles << easy
  easy
end