Project

General

Profile

« Previous | Next » 

Revision 670e5378

Added by Marc Dequènes over 10 years ago

[fix] remaining mail count stayed up when mail processing failed, leading to an infinite loop

View differences:

lib/cyborghood/imap.rb
nb
end
def decrement_remain_mails
@available_mails_mutex.synchronize do
@available_mails -= 1
end
end
def waiting_mails?
remaining_mails > 0
end
......
break if @stop_mail_check
logger.debug "*** Fetched mail ##{message_id}"
unless message_handler.call IMAPMessage.new(@imap, message_id)
ok = message_handler.call IMAPMessage.new(@imap, message_id)
decrement_remain_mails
unless ok
@stop_mail_check = true if @config.debug.flags.include?('stopatfirsterror')
break
end

Also available in: Unified diff