Fix for potential NPE on transport error.
This commit is contained in:
Timothy Bish 2014-08-08 13:42:15 -04:00
parent 4a2af3ab07
commit c391321d1b
1 changed files with 2 additions and 0 deletions

View File

@ -348,6 +348,7 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br
remoteBrokerInfo = futureRemoteBrokerInfo.get(); remoteBrokerInfo = futureRemoteBrokerInfo.get();
if (remoteBrokerInfo == null) { if (remoteBrokerInfo == null) {
fireBridgeFailed(); fireBridgeFailed();
return;
} }
} catch (Exception e) { } catch (Exception e) {
serviceRemoteException(e); serviceRemoteException(e);
@ -358,6 +359,7 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br
localBrokerInfo = futureLocalBrokerInfo.get(); localBrokerInfo = futureLocalBrokerInfo.get();
if (localBrokerInfo == null) { if (localBrokerInfo == null) {
fireBridgeFailed(); fireBridgeFailed();
return;
} }
// Before we try and build the bridge lets check if we are in a loop // Before we try and build the bridge lets check if we are in a loop