Merge pull request #47 from corda/mnesbit-fix-corruption-in-memory-network-tests

Fix errors with multi-thread InMemoryMessagingNetwork
This commit is contained in:
Matthew Nesbit 2016-12-12 09:15:52 +00:00 committed by GitHub
commit fc69624f41

View File

@ -374,7 +374,7 @@ class InMemoryMessagingNetwork(val sendManuallyPumped: Boolean) : SingletonSeria
private fun MessageTransfer.toReceivedMessage() = object : ReceivedMessage {
override val topicSession: TopicSession get() = message.topicSession
override val data: ByteArray get() = message.data
override val data: ByteArray get() = message.data.copyOf() // Kryo messes with the buffer so give each client a unique copy
override val peer: X500Name get() = X509Utilities.getDevX509Name(sender.description)
override val debugTimestamp: Instant get() = message.debugTimestamp
override val uniqueMessageId: UUID get() = message.uniqueMessageId