diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2008-10-28 13:02:09 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2008-10-28 13:02:09 -0230 |
commit | 3bac6ff61d98f09b79f34cc10e60f09afe96a95e (patch) | |
tree | c717c21ee5b51f58a2ac893ba76feb0ff8fbe632 /cpp | |
parent | Bug 3486 - Remove unecessary "cpp:const" (diff) | |
download | ice-3bac6ff61d98f09b79f34cc10e60f09afe96a95e.tar.bz2 ice-3bac6ff61d98f09b79f34cc10e60f09afe96a95e.tar.xz ice-3bac6ff61d98f09b79f34cc10e60f09afe96a95e.zip |
Bug 3410 - Check connections for ACM at more appropriate interval
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 8 |
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) { |