diff options
author | Mark Spruiell <mes@zeroc.com> | 2006-04-07 22:04:01 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2006-04-07 22:04:01 +0000 |
commit | eb0ce06d543e0eecae8d94c12c05ee3f3a58950f (patch) | |
tree | 079e45e2aaf4c8a802f3199f2216c8e92dc9c6f8 /cpp/src/Ice/ConnectionI.cpp | |
parent | reverting project to eliminate warning suppression re: bug 932 (diff) | |
download | ice-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.cpp | 12 |
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); } |