045902351
adds a `rescue` clause
to fix a bug in which IMAP parsing errors
cause the entire email import process to fail.[0]
This bugfix contains an error:
we're still not sure why,
but the `next` inside the `rescue` clause
does not act like the `next`s outside of it
(execution of the containing `.each` block continues,
even after passing `next`).
This commit puts `next` in the right place,
so that the method will skip processing of the current message
and move onto the next one.
[0]: https://github.com/zammad/zammad/issues/2754
This commit is contained in:
parent
5f861c566d
commit
7a7ab6a95a
1 changed files with 2 additions and 1 deletions
|
@ -234,9 +234,10 @@ example
|
||||||
NOTICE
|
NOTICE
|
||||||
Rails.logger.error "Net::IMAP failed to parse message #{message_id}: #{e.message} (#{e.class})"
|
Rails.logger.error "Net::IMAP failed to parse message #{message_id}: #{e.message} (#{e.class})"
|
||||||
Rails.logger.error '(See https://github.com/zammad/zammad/issues/2754 for more details)'
|
Rails.logger.error '(See https://github.com/zammad/zammad/issues/2754 for more details)'
|
||||||
next
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
next if message_meta.nil?
|
||||||
|
|
||||||
# ignore verify messages
|
# ignore verify messages
|
||||||
next if !messages_is_too_old_verify?(message_meta, count, count_all)
|
next if !messages_is_too_old_verify?(message_meta, count, count_all)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue