diff options
-rw-r--r-- | cpp/src/Ice/ConnectionI.cpp | 2 | ||||
-rw-r--r-- | cs/src/Ice/ConnectionI.cs | 6 | ||||
-rw-r--r-- | java/src/Ice/ConnectionI.java | 6 | ||||
-rw-r--r-- | js/src/Ice/ConnectionI.js | 9 |
4 files changed, 14 insertions, 9 deletions
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp index d52e0867124..6e807000c36 100644 --- a/cpp/src/Ice/ConnectionI.cpp +++ b/cpp/src/Ice/ConnectionI.cpp @@ -1180,7 +1180,7 @@ Ice::ConnectionI::setCallback(const ConnectionCallbackPtr& callback) bool closed = false; { IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - if(_state > StateClosing) + if(_state >= StateClosed) { closed = true; return; diff --git a/cs/src/Ice/ConnectionI.cs b/cs/src/Ice/ConnectionI.cs index cf5c3ef459c..026b5f649f1 100644 --- a/cs/src/Ice/ConnectionI.cs +++ b/cs/src/Ice/ConnectionI.cs @@ -766,7 +766,7 @@ namespace Ice bool closed = false; lock(this) { - if(_state > StateClosing) + if(_state >= StateClosed) { closed = true; } @@ -803,7 +803,7 @@ namespace Ice _monitor.remove(this); } _monitor = _monitor.acm(timeout, close, heartbeat); - + if(_monitor.getACM().timeout <= 0) { _acmLastActivity = -1; // Disable the recording of last activity. @@ -812,7 +812,7 @@ namespace Ice { _acmLastActivity = IceInternal.Time.currentMonotonicTimeMillis(); } - + if(_state == StateActive) { _monitor.add(this); diff --git a/java/src/Ice/ConnectionI.java b/java/src/Ice/ConnectionI.java index 58f3f043ad4..3166420ff1c 100644 --- a/java/src/Ice/ConnectionI.java +++ b/java/src/Ice/ConnectionI.java @@ -725,7 +725,7 @@ public final class ConnectionI extends IceInternal.EventHandler implements Conne boolean closed = false; synchronized(this) { - if(_state > StateClosing) + if(_state >= StateClosed) { closed = true; } @@ -762,7 +762,7 @@ public final class ConnectionI extends IceInternal.EventHandler implements Conne _monitor.remove(this); } _monitor = _monitor.acm(timeout, close, heartbeat); - + if(_monitor.getACM().timeout <= 0) { _acmLastActivity = -1; // Disable the recording of last activity. @@ -771,7 +771,7 @@ public final class ConnectionI extends IceInternal.EventHandler implements Conne { _acmLastActivity = IceInternal.Time.currentMonotonicTimeMillis(); } - + if(_state == StateActive) { _monitor.add(this); diff --git a/js/src/Ice/ConnectionI.js b/js/src/Ice/ConnectionI.js index 8e38bceaade..c95fe102920 100644 --- a/js/src/Ice/ConnectionI.js +++ b/js/src/Ice/ConnectionI.js @@ -686,7 +686,12 @@ var ConnectionI = Class({ }, setCallback: function(callback) { - if(this._state > StateClosing) + if(callback === null) + { + return; + } + + if(this._state >= StateClosed) { try { @@ -708,7 +713,7 @@ var ConnectionI = Class({ { return; } - + if(this._state == StateActive) { this._monitor.remove(this); |