mirror of
https://github.com/corda/corda.git
synced 2024-12-28 00:38:55 +00:00
Fix leak by executing acks on the messaging executor
This commit is contained in:
parent
b3ca36132f
commit
fcdb669042
@ -294,12 +294,14 @@ class P2PMessagingClient(config: NodeConfiguration,
|
|||||||
// processing a message but if so, it'll be parked waiting for us to count down the latch, so
|
// 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.
|
// the session itself is still around and we can still ack messages as a result.
|
||||||
override fun acknowledge() {
|
override fun acknowledge() {
|
||||||
|
messagingExecutor.fetchFrom {
|
||||||
state.locked {
|
state.locked {
|
||||||
artemisMessage.individualAcknowledge()
|
artemisMessage.individualAcknowledge()
|
||||||
artemis.started!!.session.commit()
|
artemis.started!!.session.commit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
deliverTo(msg, HandlerRegistration(msg.topic, deliverTo), acknowledgeHandle)
|
deliverTo(msg, HandlerRegistration(msg.topic, deliverTo), acknowledgeHandle)
|
||||||
} else {
|
} else {
|
||||||
log.warn("Received message ${msg.uniqueMessageId} for ${msg.topic} that doesn't have any registered handlers yet")
|
log.warn("Received message ${msg.uniqueMessageId} for ${msg.topic} that doesn't have any registered handlers yet")
|
||||||
|
Loading…
Reference in New Issue
Block a user