fix bug with eventmachine in dev

This commit is contained in:
Emi Matchu 2011-02-06 17:49:30 -05:00
parent 47fcf0030e
commit 28b387d4ca

View file

@ -12,7 +12,7 @@ module RocketAMF
def fetch
uri = @service.gateway.uri
data = envelope.serialize
if defined?(EventMachine) && EventMachine.reactor_running?
if defined?(EventMachine) && EventMachine.respond_to?(:reactor_running?) && EventMachine.reactor_running?
req = EM::HttpRequest.new(uri).post :body => data
response_body = req.response
else