mirror of
https://github.com/corda/corda.git
synced 2025-02-21 09:51:57 +00:00
CORDA-1536: Fix client infinitely re-trying when incorrect endpoint specified. (#3243)
Apparently, if incorrect endpoint provided, ActiveMQNotConnectedException is thrown which is different to ActiveMQSecurityException. Extend catch block to: ActiveMQException to cater for all such cases.
This commit is contained in:
parent
6791ea800d
commit
8a5978e881
@ -21,7 +21,7 @@ import net.corda.core.transactions.SignedTransaction
|
|||||||
import net.corda.core.utilities.NetworkHostAndPort
|
import net.corda.core.utilities.NetworkHostAndPort
|
||||||
import net.corda.core.utilities.contextLogger
|
import net.corda.core.utilities.contextLogger
|
||||||
import net.corda.core.utilities.seconds
|
import net.corda.core.utilities.seconds
|
||||||
import org.apache.activemq.artemis.api.core.ActiveMQSecurityException
|
import org.apache.activemq.artemis.api.core.ActiveMQException
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import rx.Subscription
|
import rx.Subscription
|
||||||
import rx.subjects.PublishSubject
|
import rx.subjects.PublishSubject
|
||||||
@ -192,8 +192,11 @@ class NodeMonitorModel {
|
|||||||
val nodeInfo = _connection.proxy.nodeInfo()
|
val nodeInfo = _connection.proxy.nodeInfo()
|
||||||
require(nodeInfo.legalIdentitiesAndCerts.isNotEmpty())
|
require(nodeInfo.legalIdentitiesAndCerts.isNotEmpty())
|
||||||
_connection
|
_connection
|
||||||
} catch(secEx: ActiveMQSecurityException) {
|
} catch(secEx: ActiveMQException) {
|
||||||
// Happens when incorrect credentials provided - no point to retry connecting.
|
// Happens when:
|
||||||
|
// * incorrect credentials provided;
|
||||||
|
// * incorrect endpoint specified;
|
||||||
|
// - no point to retry connecting.
|
||||||
throw secEx
|
throw secEx
|
||||||
}
|
}
|
||||||
catch(th: Throwable) {
|
catch(th: Throwable) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user