Navigation Menu

Skip to content

Commit

Permalink
Allow compatibility with em-synchrony
Browse files Browse the repository at this point in the history
  • Loading branch information
obrie committed Oct 18, 2013
1 parent 3d9b737 commit ddba784
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/em-net-http.rb
Expand Up @@ -135,8 +135,10 @@ def request(req, body = nil, &block)
headers['content-type'] ||= "application/x-www-form-urlencoded"

t0 = Time.now
http = EM::HttpRequest.new(uri)
request_method = (req.respond_to?(:method) ? req.method : req.class::METHOD).downcase.to_sym
httpreq = EM::HttpRequest.new(uri).send(request_method, opts)
request_method = :"a#{request_method}" if http.respond_to?(:"a#{request_method}")
httpreq = http.send(request_method, opts)

f=Fiber.current

Expand Down

0 comments on commit ddba784

Please sign in to comment.