Shortening lines

This commit is contained in:
Dimos Raptis 2019-10-14 13:37:40 +01:00
parent a7884c53aa
commit 05a8f050e3
2 changed files with 4 additions and 2 deletions

View File

@ -14,7 +14,8 @@ open class RPCException(message: String?, cause: Throwable?) : CordaRuntimeExcep
* @param maxNumberOfRetries the number of retries that had been performed.
* @param cause the cause of the last failed attempt.
*/
class MaxRpcRetryException(maxNumberOfRetries: Int, cause: Throwable?): RPCException("Max number of retries ($maxNumberOfRetries) was reached.", cause)
class MaxRpcRetryException(maxNumberOfRetries: Int, cause: Throwable?):
RPCException("Max number of retries ($maxNumberOfRetries) was reached.", cause)
/**
* Signals that the underlying [RPCConnection] dropped.

View File

@ -300,7 +300,8 @@ class ReconnectingCordaRPCOps private constructor(
return when (method.returnType) {
DataFeed::class.java -> {
// Intercept the data feed methods and return a ReconnectingObservable instance
val initialFeed: DataFeed<Any, Any?> = uncheckedCast(doInvoke(method, args, reconnectingRPCConnection.gracefulReconnect.maxRetries))
val initialFeed: DataFeed<Any, Any?> = uncheckedCast(doInvoke(method, args,
reconnectingRPCConnection.gracefulReconnect.maxRetries))
val observable = ReconnectingObservable(reconnectingRPCConnection, initialFeed) {
// This handles reconnecting and creates new feeds.
uncheckedCast(this.invoke(reconnectingRPCConnection.proxy, method, args))