PR 339 Address comments

This commit is contained in:
Andras Slemmer 2017-03-14 15:17:06 +00:00
parent 60520412c8
commit 389685a31e

View File

@ -284,11 +284,8 @@ class CordaRPCClientImpl(private val session: ClientSession,
private val rootShared = root.doOnUnsubscribe { close() }.share() private val rootShared = root.doOnUnsubscribe { close() }.share()
// This could be made more efficient by using a specialised IntMap // This could be made more efficient by using a specialised IntMap
/** // When handling this map we don't synchronise on [this], otherwise there is a race condition between close() and deliver()
* When handling this map we synchronise on it explicitly instead of on [this], otherwise there is a race private val observables = Collections.synchronizedMap(HashMap<Int, Observable<Any>>())
* condition between close() and deliver()
*/
private val observables = HashMap<Int, Observable<Any>>()
private var consumer: ClientConsumer? = null private var consumer: ClientConsumer? = null