summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Instance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r--cpp/src/Ice/Instance.cpp8
1 files changed, 7 insertions, 1 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)
{