From c7c38fd91cc6e478dab5f65c024db5f01e5a07ed Mon Sep 17 00:00:00 2001
From: Rick Parker <rick.parker@r3.com>
Date: Mon, 18 Jun 2018 17:40:03 +0100
Subject: [PATCH] ENT-2053 Fix messaging TTL related settings causing
 disconnects (#1011)

---
 .../services/artemis/BridgeArtemisConnectionServiceImpl.kt    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bridge/src/main/kotlin/net/corda/bridge/services/artemis/BridgeArtemisConnectionServiceImpl.kt b/bridge/src/main/kotlin/net/corda/bridge/services/artemis/BridgeArtemisConnectionServiceImpl.kt
index 1e44e903da..98aa534e7b 100644
--- a/bridge/src/main/kotlin/net/corda/bridge/services/artemis/BridgeArtemisConnectionServiceImpl.kt
+++ b/bridge/src/main/kotlin/net/corda/bridge/services/artemis/BridgeArtemisConnectionServiceImpl.kt
@@ -75,8 +75,8 @@ class BridgeArtemisConnectionServiceImpl(val conf: BridgeConfiguration,
             locator = ActiveMQClient.createServerLocatorWithoutHA(*tcpTransports.toTypedArray()).apply {
                 // Never time out on our loopback Artemis connections. If we switch back to using the InVM transport this
                 // would be the default and the two lines below can be deleted.
-                connectionTTL = -1
-                clientFailureCheckPeriod = -1
+                connectionTTL = 60000
+                clientFailureCheckPeriod = 30000
                 minLargeMessageSize = maxMessageSize
                 isUseGlobalPools = nodeSerializationEnv != null
                 confirmationWindowSize = conf.p2pConfirmationWindowSize