lib/toiler/actor/fetcher.rb in toiler-0.3.3 vs lib/toiler/actor/fetcher.rb in toiler-0.3.4
- old
+ new
@@ -78,10 +78,10 @@
max_number_of_messages: max_messages
end
end
def poll_messages
- polling.make_true
+ return unless polling.make_true
poll_future.on_completion! do |success, msgs, error|
polling.make_false
scheduled.make_false
if success && !msgs.nil? && !msgs.empty?
tell [:assign_messages, msgs]