From fcdb66904294a8c27627f9ed8e1bb46839d11231 Mon Sep 17 00:00:00 2001 From: Andras Slemmer Date: Thu, 7 Dec 2017 15:18:03 +0000 Subject: [PATCH] Fix leak by executing acks on the messaging executor --- .../corda/node/services/messaging/P2PMessagingClient.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/node/src/main/kotlin/net/corda/node/services/messaging/P2PMessagingClient.kt b/node/src/main/kotlin/net/corda/node/services/messaging/P2PMessagingClient.kt index a879af3b56..753e9ff330 100644 --- a/node/src/main/kotlin/net/corda/node/services/messaging/P2PMessagingClient.kt +++ b/node/src/main/kotlin/net/corda/node/services/messaging/P2PMessagingClient.kt @@ -294,9 +294,11 @@ class P2PMessagingClient(config: NodeConfiguration, // processing a message but if so, it'll be parked waiting for us to count down the latch, so // the session itself is still around and we can still ack messages as a result. override fun acknowledge() { - state.locked { - artemisMessage.individualAcknowledge() - artemis.started!!.session.commit() + messagingExecutor.fetchFrom { + state.locked { + artemisMessage.individualAcknowledge() + artemis.started!!.session.commit() + } } } }