diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-12-23 09:40:40 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-12-23 09:40:40 +0100 |
commit | 7429e67d2f7ea0edacc97c1bb5c04c97fa89680d (patch) | |
tree | 3a2ce5c1d1b37f468c7a2854bf96a9c8dd176f4a /cpp | |
parent | ICE-6223 - Fixed icegrid scripts in Ubuntu packages (diff) | |
download | ice-7429e67d2f7ea0edacc97c1bb5c04c97fa89680d.tar.bz2 ice-7429e67d2f7ea0edacc97c1bb5c04c97fa89680d.tar.xz ice-7429e67d2f7ea0edacc97c1bb5c04c97fa89680d.zip |
Fixed ICE-5751 - don't close the connections for retries
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/test/Ice/retry/Server.cpp | 5 | ||||
-rw-r--r-- | cpp/test/Ice/retry/TestI.cpp | 19 |
2 files changed, 6 insertions, 18 deletions
diff --git a/cpp/test/Ice/retry/Server.cpp b/cpp/test/Ice/retry/Server.cpp index efb074c3d3e..34946a5d1c4 100644 --- a/cpp/test/Ice/retry/Server.cpp +++ b/cpp/test/Ice/retry/Server.cpp @@ -36,7 +36,10 @@ main(int argc, char* argv[]) try { - communicator = Ice::initialize(argc, argv); + Ice::InitializationData initData; + initData.properties = Ice::createProperties(argc, argv); + initData.properties->setProperty("Ice.Warn.Dispatch", "0"); + communicator = Ice::initialize(argc, argv, initData); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) diff --git a/cpp/test/Ice/retry/TestI.cpp b/cpp/test/Ice/retry/TestI.cpp index 9a0ed3fc81d..b2cbc9900c0 100644 --- a/cpp/test/Ice/retry/TestI.cpp +++ b/cpp/test/Ice/retry/TestI.cpp @@ -43,15 +43,7 @@ RetryI::opIdempotent(int nRetry, const Ice::Current& current) if(nRetry > _counter) { ++_counter; - if(current.con) - { - current.con->close(true); - } - else - { - throw Ice::ConnectionLostException(__FILE__, __LINE__); - } - return 0; + throw Ice::ConnectionLostException(__FILE__, __LINE__); } int counter = _counter; _counter = 0; @@ -61,14 +53,7 @@ RetryI::opIdempotent(int nRetry, const Ice::Current& current) void RetryI::opNotIdempotent(const Ice::Current& current) { - if(current.con) - { - current.con->close(true); - } - else - { - throw Ice::ConnectionLostException(__FILE__, __LINE__); - } + throw Ice::ConnectionLostException(__FILE__, __LINE__); } void |