Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-716

SMTPAppenderBase, mimeMsg field, racing condition

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.0.6
    • logback-core
    • None

    Description

      sendBuffer method reuses mimeMsg field to send emails. Sending emails is done asynchronously in threads. This results into sending invalid messages, for example subject may come from a different message. As a quick and dirty fix the "sendBuffer" method can be declared as synchronized. A better approach would be to create an instance of MimeMessage for every email to be sent.

      P.S. While scrutinizing this module I also noticed that "cb.asList();" line in the "append" method seems to be doing nothing and hence brings an unnecessary minor performance impact.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            yurx Yuri Cherio
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: