Fixing missing volatile on references in VMTransport to prevent a synchronization bug.

This resolves https://issues.apache.org/jira/browse/AMQ-5787
This commit is contained in:
Christopher L. Shannon (cshannon) 2015-05-20 18:38:59 +00:00 committed by Daniel Kulp
parent 2ad1f1eaa9
commit 3769284ecd
1 changed files with 3 additions and 3 deletions

View File

@ -56,9 +56,9 @@ public class VMTransport implements Transport, Task {
protected final long id; protected final long id;
// Implementation // Implementation
private LinkedBlockingQueue<Object> messageQueue; private volatile LinkedBlockingQueue<Object> messageQueue;
private TaskRunnerFactory taskRunnerFactory; private volatile TaskRunnerFactory taskRunnerFactory;
private TaskRunner taskRunner; private volatile TaskRunner taskRunner;
// Transport State // Transport State
protected final AtomicBoolean started = new AtomicBoolean(); protected final AtomicBoolean started = new AtomicBoolean();