summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ConnectionI.cpp
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 /cpp/src/Ice/ConnectionI.cpp
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 'cpp/src/Ice/ConnectionI.cpp')
-rw-r--r--cpp/src/Ice/ConnectionI.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp
index e8c80f3577a..32ddfd518a1 100644
--- a/cpp/src/Ice/ConnectionI.cpp
+++ b/cpp/src/Ice/ConnectionI.cpp
@@ -232,6 +232,12 @@ void
Ice::ConnectionI::activate()
{
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
+
+ while(_state == StateNotValidated)
+ {
+ wait();
+ }
+
setState(StateActive);
}
@@ -239,6 +245,12 @@ void
Ice::ConnectionI::hold()
{
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
+
+ while(_state == StateNotValidated)
+ {
+ wait();
+ }
+
setState(StateHolding);
}