summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpp/src/Ice/Instance.cpp8
-rw-r--r--cs/src/Ice/Instance.cs8
-rw-r--r--java/src/IceInternal/Instance.java8
3 files changed, 21 insertions, 3 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 8a1e5f45405..4d388ee36b1 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -1129,7 +1129,9 @@ IceInternal::Instance::finishSetup(int& argc, char* argv[])
}
//
- // Start connection monitor if necessary.
+ // Start connection monitor if necessary. Set the check interval to
+ // 1/10 of the ACM timeout with a minmal value of 1 second and a
+ // maximum value of 5 minutes.
//
Int interval = 0;
if(_clientACM > 0 && _serverACM > 0)
@@ -1144,6 +1146,10 @@ IceInternal::Instance::finishSetup(int& argc, char* argv[])
{
interval = _serverACM;
}
+ if(interval > 0)
+ {
+ interval = min(300, max(1, (int)interval / 10));
+ }
interval = _initData.properties->getPropertyAsIntWithDefault("Ice.MonitorConnections", interval);
if(interval > 0)
{
diff --git a/cs/src/Ice/Instance.cs b/cs/src/Ice/Instance.cs
index 2c9012ea81c..5e22879628f 100644
--- a/cs/src/Ice/Instance.cs
+++ b/cs/src/Ice/Instance.cs
@@ -807,7 +807,9 @@ namespace IceInternal
}
//
- // Start connection monitor if necessary.
+ // Start connection monitor if necessary. Set the check interval to
+ // 1/10 of the ACM timeout with a minmal value of 1 second and a
+ // maximum value of 5 minutes.
//
int interval = 0;
if(_clientACM > 0 && _serverACM > 0)
@@ -829,6 +831,10 @@ namespace IceInternal
{
interval = _serverACM;
}
+ if(interval > 0)
+ {
+ interval = System.Math.Min(300, System.Math.Max(1, (int)interval / 10));
+ }
interval = _initData.properties.getPropertyAsIntWithDefault("Ice.MonitorConnections", interval);
if(interval > 0)
{
diff --git a/java/src/IceInternal/Instance.java b/java/src/IceInternal/Instance.java
index 1ee242ba63c..9e8e0d9e612 100644
--- a/java/src/IceInternal/Instance.java
+++ b/java/src/IceInternal/Instance.java
@@ -789,7 +789,9 @@ public final class Instance
}
//
- // Start connection monitor if necessary.
+ // Start connection monitor if necessary. Set the check interval to
+ // 1/10 of the ACM timeout with a minmal value of 1 second and a
+ // maximum value of 5 minutes.
//
int interval = 0;
if(_clientACM > 0 && _serverACM > 0)
@@ -811,6 +813,10 @@ public final class Instance
{
interval = _serverACM;
}
+ if(interval > 0)
+ {
+ interval = java.lang.Math.min(300, java.lang.Math.max(1, (int)interval / 10));
+ }
interval = _initData.properties.getPropertyAsIntWithDefault("Ice.MonitorConnections", interval);
if(interval > 0)
{