summaryrefslogtreecommitdiff
path: root/java/src/Ice/ConnectionI.java
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2014-08-08 16:48:43 -0230
committerMatthew Newhook <matthew@zeroc.com>2014-08-08 16:48:43 -0230
commit98a1b3ffe79fda923712c684ba08f67c2d9aed5e (patch)
treeb5be1ffb57fe5923943779f396c69da7ee59434c /java/src/Ice/ConnectionI.java
parentFixed lots of warnings. (diff)
downloadice-98a1b3ffe79fda923712c684ba08f67c2d9aed5e.tar.bz2
ice-98a1b3ffe79fda923712c684ba08f67c2d9aed5e.tar.xz
ice-98a1b3ffe79fda923712c684ba08f67c2d9aed5e.zip
ICE-5630 - ACM timeout is broken
- Also refactored the code a bit in java so that the ACMMonitor doesn't inherit from runnable.
Diffstat (limited to 'java/src/Ice/ConnectionI.java')
-rw-r--r--java/src/Ice/ConnectionI.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/java/src/Ice/ConnectionI.java b/java/src/Ice/ConnectionI.java
index 3e8c735a99d..c835e398735 100644
--- a/java/src/Ice/ConnectionI.java
+++ b/java/src/Ice/ConnectionI.java
@@ -893,11 +893,7 @@ public final class ConnectionI extends IceInternal.EventHandler implements Conne
_monitor.remove(this);
}
_monitor = _monitor.acm(timeout, close, heartbeat);
- if(_state == StateActive)
- {
- _monitor.add(this);
- }
-
+
if(_monitor.getACM().timeout <= 0)
{
_acmLastActivity = -1; // Disable the recording of last activity.
@@ -906,6 +902,12 @@ public final class ConnectionI extends IceInternal.EventHandler implements Conne
{
_acmLastActivity = IceInternal.Time.currentMonotonicTimeMillis();
}
+
+ if(_state == StateActive)
+ {
+ _monitor.add(this);
+ }
+
}
}
@@ -2066,11 +2068,11 @@ public final class ConnectionI extends IceInternal.EventHandler implements Conne
{
if(state == StateActive)
{
- _monitor.add(this);
if(_acmLastActivity > 0)
{
_acmLastActivity = IceInternal.Time.currentMonotonicTimeMillis();
}
+ _monitor.add(this);
}
else if(_state == StateActive)
{