This repository was archived by the owner on May 25, 2018. It is now read-only.

Description
- ruby 2.1.2
- rails '4.1.6'
- faye-rails 2.0.0
With no identified reason and inconsistently, this error is raised once or twice a day, for an app in production, by two lines of an app in production. One of the line is called from a background task, the other isn't.
These 2 lines are refers to a version of FayeRails::Controller.publish(), that raises an error directly in eventmachine :
extract from eventmachine code
def set_deferred_status status, *args
cancel_timeout
@errbacks ||= nil
@callbacks ||= nil
@deferred_status = status
@deferred_args = args
case @deferred_status
when :succeeded
if @callbacks
while cb = @callbacks.pop # This line raises the error =========
cb.call(*@deferred_args)
end
end
@errbacks.clear if @errbacks
when :failed
if @errbacks
while eb = @errbacks.pop
eb.call(*@deferred_args)
end
end
@callbacks.clear if @callbacks
end
end
How comes FayeRails::Controller could have no @callbacks ? Have you met this before ?
It may be linked with my comment on #73 as it raises also on FayeRails::Controller.publish()