Merge pull request #1391 from corda/chrisr3-os-merge

Merge from Open Source
This commit is contained in:
Chris Rankin
2018-09-13 15:14:50 +01:00
committed by GitHub
19 changed files with 208 additions and 144 deletions

View File

@ -1,5 +1,5 @@
plugins {
id "com.github.johnrengelman.shadow" version "2.0.4"
id 'com.github.johnrengelman.shadow'
}
apply plugin: 'kotlin'
apply plugin: 'net.corda.plugins.quasar-utils'

View File

@ -71,8 +71,11 @@ class ArtemisMessagingClient(private val config: MutualSslConfiguration,
override fun stop() = synchronized(this) {
started?.run {
producer.close()
// Ensure any trailing messages are committed to the journal
session.commit()
// Since we are leaking the session outside of this class it may well be already closed.
if(!session.isClosed) {
// Ensure any trailing messages are committed to the journal
session.commit()
}
// Closing the factory closes all the sessions it produced as well.
sessionFactory.close()
serverLocator.close()