mirror of
https://github.com/corda/corda.git
synced 2025-05-30 14:14:29 +00:00
Minor: more helpful warning when an observable is leaked.
This commit is contained in:
parent
0c0c5521c0
commit
cf4363dc2e
@ -389,9 +389,13 @@ class CordaRPCClientImpl(private val session: ClientSession,
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
if (closed) {
|
if (closed) {
|
||||||
rpcLog.warn("A hot observable returned from an RPC ($rpcName) was never subscribed to. " +
|
rpcLog.warn("""A hot observable returned from an RPC ($rpcName) was never subscribed to.
|
||||||
"This wastes server-side resources because it was queueing observations for retrieval. " +
|
This wastes server-side resources because it was queueing observations for retrieval.
|
||||||
"It is being closed now, but please adjust your code to subscribe and unsubscribe from the observable to close it explicitly.", rpcLocation)
|
It is being closed now, but please adjust your code to call .notUsed() on the observable
|
||||||
|
to close it explicitly. (Java users: subscribe to it then unsubscribe). This warning
|
||||||
|
will appear less frequently in future versions of the platform and you can ignore it
|
||||||
|
if you want to.
|
||||||
|
""".trimIndent().replace('\n', ' '), rpcLocation)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user