lib/pubsubstub/stream_action.rb in pubsubstub-0.2.1 vs lib/pubsubstub/stream_action.rb in pubsubstub-0.2.2

- old
+ new

@@ -39,17 +39,13 @@ end end end def use_persistent_connections? - Pubsubstub.use_persistent_connections && !event_machine? + Pubsubstub.use_persistent_connections end - def event_machine? - defined?(EventMachine) && EventMachine.reactor_running? - end - def subscribe_connection(channels, last_event_id) Stream.new do |connection| subscription = register(channels, connection) begin subscription.stream(last_event_id) @@ -72,15 +68,11 @@ def spawn_helper_threads return if defined? @helper_threads_initialized @mutex.synchronize do return if defined? @helper_threads_initialized @helper_threads_initialized = true - if event_machine? - error { "EventMachine is loaded, running in degraded mode :/"} - else - start_subscriber - start_heartbeat - end + start_subscriber + start_heartbeat end end def start_subscriber Thread.start do