mirror of https://github.com/apache/activemq.git
added NPE check
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@550793 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8068c5e155
commit
f6e1ac7f97
|
@ -115,13 +115,13 @@ public class FanoutTransport implements CompositeTransport {
|
|||
if( rc != null ) {
|
||||
if( rc.ackCount.decrementAndGet() <= 0 ) {
|
||||
requestMap.remove(id);
|
||||
transportListener.onCommand(command);
|
||||
transportListenerOnCommand(command);
|
||||
}
|
||||
} else {
|
||||
transportListener.onCommand(command);
|
||||
transportListenerOnCommand(command);
|
||||
}
|
||||
} else {
|
||||
transportListener.onCommand(command);
|
||||
transportListenerOnCommand(command);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -144,10 +144,12 @@ public class FanoutTransport implements CompositeTransport {
|
|||
}
|
||||
catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
if (transportListener != null) {
|
||||
transportListener.onException(new InterruptedIOException());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public FanoutTransport() throws InterruptedIOException {
|
||||
// Setup a task that is used to reconnect the a connection async.
|
||||
|
@ -532,4 +534,9 @@ public class FanoutTransport implements CompositeTransport {
|
|||
return null;
|
||||
}
|
||||
|
||||
protected void transportListenerOnCommand(Command command) {
|
||||
if (transportListener != null) {
|
||||
transportListener.onCommand(command);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue