Cannot remove key after adding it by slot
poorva29 opened this issue · 0 comments
Added a key by slot -
gilmour.slot(topic, excl_group: 'ping', &handler)
on removing the listener by -
gilmour.remove_listener(topic, h[:handler])
tried it by prepending it with -
gilmour.remove_listener("gilmour.slot.#{topic}", h[:handler])
and this works , then no error is thrown
Below is the stack trace for the same -
"undefined method delete_if' for nil:NilClass" ["/home/poorva/.rvm/gems/ruby-2.0.0-p353/bundler/gems/gilmour-98cb1360b56d/lib/gilmour/backends/redis.rb:202:in remove_listener'", "/home/poorva/tuts-rails/location_monitor/app/actions/sse_action.rb:89:in block in garbage_collect_handlers'", "/home/poorva/tuts-rails/location_monitor/app/actions/sse_action.rb:85:in each'", "/home/poorva/tuts-rails/location_monitor/app/actions/sse_action.rb:85:in garbage_collect_handlers'", "/home/poorva/tuts-rails/location_monitor/app/actions/sse_action.rb:81:in garbage_collect_connection'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/gems/cramp-0.15.2/lib/cramp/callbacks.rb:51:in block (2 levels) in on_finish'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/gems/cramp-0.15.2/lib/cramp/callbacks.rb:58:in block in callback_wrapper'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/gems/eventmachine-1.0.3/lib/eventmachine.rb:959:in call'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/gems/eventmachine-1.0.3/lib/eventmachine.rb:959:in block in run_deferred_callbacks'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/gems/eventmachine-1.0.3/lib/eventmachine.rb:956:in times'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/gems/eventmachine-1.0.3/lib/eventmachine.rb:956:in run_deferred_callbacks'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in run_machine'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in run'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/gems/thin-1.6.1/lib/thin/backends/base.rb:73:in start'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/gems/thin-1.6.1/lib/thin/server.rb:162:in start'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/gems/thin-1.6.1/lib/thin/controllers/controller.rb:87:in start'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/gems/thin-1.6.1/lib/thin/runner.rb:200:in run_command'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/gems/thin-1.6.1/lib/thin/runner.rb:156:in run!'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/gems/thin-1.6.1/bin/thin:6:in <top (required)>'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/bin/thin:23:in load'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/bin/thin:23:in <main>'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in eval'", "/home/poorva/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in <main>'"]