summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2006-04-07 22:04:01 +0000
committerMark Spruiell <mes@zeroc.com>2006-04-07 22:04:01 +0000
commiteb0ce06d543e0eecae8d94c12c05ee3f3a58950f (patch)
tree079e45e2aaf4c8a802f3199f2216c8e92dc9c6f8 /java/src
parentreverting project to eliminate warning suppression re: bug 932 (diff)
downloadice-eb0ce06d543e0eecae8d94c12c05ee3f3a58950f.tar.bz2
ice-eb0ce06d543e0eecae8d94c12c05ee3f3a58950f.tar.xz
ice-eb0ce06d543e0eecae8d94c12c05ee3f3a58950f.zip
fix for bug 930: race condition in connection processing
Diffstat (limited to 'java/src')
-rw-r--r--java/src/Ice/ConnectionI.java24
1 files changed, 23 insertions, 1 deletions
diff --git a/java/src/Ice/ConnectionI.java b/java/src/Ice/ConnectionI.java
index 5465b018d68..7fe19e7029f 100644
--- a/java/src/Ice/ConnectionI.java
+++ b/java/src/Ice/ConnectionI.java
@@ -60,7 +60,7 @@ public final class ConnectionI extends IceInternal.EventHandler implements Conne
return;
}
-
+
//
// The connection might already be closed (e.g.: the communicator
// was destroyed or object adapter deactivated.)
@@ -212,12 +212,34 @@ public final class ConnectionI extends IceInternal.EventHandler implements Conne
public synchronized void
activate()
{
+ while(_state == StateNotValidated)
+ {
+ try
+ {
+ wait();
+ }
+ catch(InterruptedException ex)
+ {
+ }
+ }
+
setState(StateActive);
}
public synchronized void
hold()
{
+ while(_state == StateNotValidated)
+ {
+ try
+ {
+ wait();
+ }
+ catch(InterruptedException ex)
+ {
+ }
+ }
+
setState(StateHolding);
}