diff options
-rw-r--r-- | cpp/test/IceStorm/stress/Subscriber.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cpp/test/IceStorm/stress/Subscriber.cpp b/cpp/test/IceStorm/stress/Subscriber.cpp index e05ebbea313..d7c255f9177 100644 --- a/cpp/test/IceStorm/stress/Subscriber.cpp +++ b/cpp/test/IceStorm/stress/Subscriber.cpp @@ -233,7 +233,16 @@ public: { try { - subscription.publisher->ice_ping(); + // + // check might be invoked before IceStorm got a chance to process the close connection + // message from this subscriber, retry if the ice_ping still succeeds. + // + int nRetry = 5; + while(--nRetry > 0) + { + subscription.publisher->ice_ping(); + IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(200)); + } test(false); } catch(const Ice::ObjectNotExistException&) |