lib/firehose/server/channel_subscription.rb
# Can be raised if a Subscription failed for any reason.
Can be raised if a Subscription failed for any reason.
Can be raised if a Subscription failed for any reason .
def subscribe
        @subscriber.subscribe self
        if @timeout
          timer = EventMachine::Timer.new(@timeout) do
            @deferrable.fail :timeout
            unsubscribe
          end
          @deferrable.callback { timer.cancel }
        end
      end
def subscribe @subscriber . subscribe self if @timeout timer = EventMachine :: Timer . new ( @timeout ) do @deferrable . fail :timeout unsubscribe end @deferrable . callback { timer . cancel } end end
Can be raised if a Subscription failed for any reason.
Can be raised if a Subscription failed for any reason .
# Cancel the timer if when the deferrable succeeds