CORDA-3393 Lazy load MessageDeduplicationHandler.flowId

This is to potentially help with debugging in the future as the
`flowId` could become confusing for received messages where the `flowId`
has nothing to do with the current flow.
This commit is contained in:
LankyDan 2019-11-06 11:26:25 +00:00
parent d9876f5537
commit 91f35d5967

View File

@ -425,7 +425,7 @@ class P2PMessagingClient(val config: NodeConfiguration,
private inner class MessageDeduplicationHandler(val artemisMessage: ClientMessage, override val receivedMessage: ReceivedMessage) : DeduplicationHandler, ExternalEvent.ExternalMessageEvent {
override val externalCause: ExternalEvent
get() = this
override val flowId: StateMachineRunId = StateMachineRunId.createRandom()
override val flowId: StateMachineRunId by lazy { StateMachineRunId.createRandom() }
override val deduplicationHandler: MessageDeduplicationHandler
get() = this