Defect #18922

rdm-mailhandler.rb should catch EOFError

Added by Go MAEDA almost 4 years ago. Updated over 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Email receiving
Target version:2.6.2
Resolution:Fixed Affected version:2.6.1

Description

rdm-mailhandler.rb should catch EOFError in addition to SystemCallError at source:trunk/extra/mail_handler/rdm-mailhandler.rb@13872#L132.

If communications between rdm-mailhandler.rb and Redmine are terminated while rdm-mailhandler.rb talking to Redmine, Net::HTTP raises EOFError and rdm-mailhandler stops unexpectedly because it does not catch EOFError. The email will be bounced.

We can avoid the preceding by this patch. The email will be deferred, not bounced.

catch-EOFError.diff Magnifier (669 Bytes) Go MAEDA, 2015-01-21 09:44

catch-IOError.diff Magnifier (668 Bytes) Go MAEDA, 2015-02-01 03:16

Associated revisions

Revision 13961
Added by Jean-Philippe Lang almost 4 years ago

rdm-mailhandler.rb should catch EOFError (#18922).

Patch by Go MAEDA.

History

#1 Updated by Jean-Philippe Lang almost 4 years ago

Maybe we could even catch IOError which is the superclass of EOFError?

#2 Updated by Go MAEDA almost 4 years ago

Jean-Philippe Lang wrote:

Maybe we could even catch IOError which is the superclass of EOFError?

Indeed. To deal with a variety of situations, catching IOError is better solition.
Thank you for pointing it out.

#3 Updated by Go MAEDA almost 4 years ago

Here is a new patch. Catches IOError instead of EOFError.

#4 Updated by Jean-Philippe Lang almost 4 years ago

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.6.2
  • Resolution set to Fixed

Patch committed in r13961, thanks.

#5 Updated by Jean-Philippe Lang over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF