avoid npe on network bridge failure, dispose when not started on vm transport

This commit is contained in:
gtully 2014-10-09 13:44:30 +01:00
parent ad770ea79d
commit a56996dd6c
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ public class VMTransport implements Transport, Task {
public void stop() throws Exception {
// Only need to do this once, all future oneway calls will now
// fail as will any asnyc jobs in the task runner.
if (disposed.compareAndSet(false, true)) {
if (disposed.compareAndSet(false, true) && started.get()) {
TaskRunner tr = taskRunner;
LinkedBlockingQueue<Object> mq = this.messageQueue;