Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-6560

Improve thread safety of pendingStop flag in TransportConnection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.14.3
    • 5.15.0, 5.14.4
    • Broker
    • None

    Description

      I was looking at TransportConnection and I noticed that the pendingStop flag was a normal boolean but not always accessed inside of a synchronized block. This is an issue because multiple threads might be checking this flag (such as when the inactivity monitor runs). The starting flag has the same issue. Both of these booleans can be converted to AtomicBoolean which will simplify things and guarantee thread visibility on change.

      Attachments

        Activity

          People

            cshannon Christopher L. Shannon
            cshannon Christopher L. Shannon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: