diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-11-24 16:51:35 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-11-24 16:51:35 +0100 |
commit | b4a5d124a1790ac05348001add182796a43b89b9 (patch) | |
tree | 5564440e2b966fa638e649bed294bd3658ab9d23 /cpp/src/Ice/Outgoing.cpp | |
parent | Fixed Windows build failure introduced by previous fix (diff) | |
download | ice-b4a5d124a1790ac05348001add182796a43b89b9.tar.bz2 ice-b4a5d124a1790ac05348001add182796a43b89b9.tar.xz ice-b4a5d124a1790ac05348001add182796a43b89b9.zip |
Another fix for ICE-5751: retry test failure
Diffstat (limited to 'cpp/src/Ice/Outgoing.cpp')
-rw-r--r-- | cpp/src/Ice/Outgoing.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/cpp/src/Ice/Outgoing.cpp b/cpp/src/Ice/Outgoing.cpp index cce1086363d..1e466b51f23 100644 --- a/cpp/src/Ice/Outgoing.cpp +++ b/cpp/src/Ice/Outgoing.cpp @@ -325,15 +325,28 @@ Outgoing::invoke() { if(invocationTimeout > 0) { - Time deadline = _invocationTimeoutDeadline - Time::now(Time::Monotonic); - if(deadline < interval) + IceUtil::Time now = Time::now(Time::Monotonic); + if(_invocationTimeoutDeadline > now) { - interval = deadline; + Time deadline = _invocationTimeoutDeadline - now; + if(deadline < interval) + { + interval = deadline; + } + ThreadControl::sleep(interval); + if(_invocationTimeoutDeadline > Time::now(Time::Monotonic)) + { + _observer.retried(); + } } } - ThreadControl::sleep(interval); + else + { + ThreadControl::sleep(interval); + _observer.retried(); + } } - if(_invocationTimeoutDeadline == Time() || _invocationTimeoutDeadline > Time::now(Time::Monotonic)) + else { _observer.retried(); } |