You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Christopher L. Shannon (JIRA)" <ji...@apache.org> on 2017/01/12 12:42:52 UTC

[jira] [Resolved] (AMQ-6560) Improve thread safety of pendingStop flag in TransportConnection

     [ https://issues.apache.org/jira/browse/AMQ-6560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher L. Shannon resolved AMQ-6560.
-----------------------------------------
       Resolution: Fixed
    Fix Version/s: 5.14.4
                   5.15.0

> Improve thread safety of pendingStop flag in TransportConnection
> ----------------------------------------------------------------
>
>                 Key: AMQ-6560
>                 URL: https://issues.apache.org/jira/browse/AMQ-6560
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.14.3
>            Reporter: Christopher L. Shannon
>            Assignee: Christopher L. Shannon
>            Priority: Minor
>             Fix For: 5.15.0, 5.14.4
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)