diff --git a/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/RPCClientProxyHandler.kt b/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/RPCClientProxyHandler.kt index 8852a096cd..458bea35ef 100644 --- a/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/RPCClientProxyHandler.kt +++ b/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/RPCClientProxyHandler.kt @@ -417,7 +417,7 @@ class RPCClientProxyHandler( } private fun attemptReconnect() { - var reconnectAttempts = rpcConfiguration.maxReconnectAttempts * serverLocator.staticTransportConfigurations.size + var reconnectAttempts = rpcConfiguration.maxReconnectAttempts.times(serverLocator.staticTransportConfigurations.size) var retryInterval = rpcConfiguration.connectionRetryInterval val maxRetryInterval = rpcConfiguration.connectionMaxRetryInterval diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/ArtemisTcpTransport.kt b/node-api/src/main/kotlin/net/corda/nodeapi/ArtemisTcpTransport.kt index a9438611a4..40333af921 100644 --- a/node-api/src/main/kotlin/net/corda/nodeapi/ArtemisTcpTransport.kt +++ b/node-api/src/main/kotlin/net/corda/nodeapi/ArtemisTcpTransport.kt @@ -97,5 +97,19 @@ class ArtemisTcpTransport { } return TransportConfiguration(factoryName, options) } + + /** Create as list of [TransportConfiguration]. **/ + fun tcpTransportsFromList( + direction: ConnectionDirection, + hostAndPortList: List, + config: SSLConfiguration?, + enableSSL: Boolean = true): List{ + val tcpTransports = ArrayList(hostAndPortList.size) + hostAndPortList.forEach { + tcpTransports.add(tcpTransport(direction, it, config, enableSSL)) + } + + return tcpTransports + } } }