You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/10/19 12:40:09 UTC

[23/50] qpid-proton git commit: PROTON-1610: c++ intermittent self test fails

PROTON-1610: c++ intermittent self test fails

C++ scheduler was not checking for (next->time < now), negative timeout interval
converted to large unsigned value when passed to pn_proactor_set_time-out.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/f76f2892
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/f76f2892
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/f76f2892

Branch: refs/heads/go1
Commit: f76f28927e176b5b994d865a19e54f25d9708eb3
Parents: bc60140
Author: Alan Conway <ac...@redhat.com>
Authored: Fri Oct 13 14:39:42 2017 +0100
Committer: Alan Conway <ac...@redhat.com>
Committed: Fri Oct 13 14:42:05 2017 +0100

----------------------------------------------------------------------
 proton-c/bindings/cpp/src/proactor_container_impl.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f76f2892/proton-c/bindings/cpp/src/proactor_container_impl.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/proactor_container_impl.cpp b/proton-c/bindings/cpp/src/proactor_container_impl.cpp
index 92feaaa..f59cb9b 100644
--- a/proton-c/bindings/cpp/src/proactor_container_impl.cpp
+++ b/proton-c/bindings/cpp/src/proactor_container_impl.cpp
@@ -406,7 +406,8 @@ void container::impl::schedule(duration delay, work f) {
 
     // Set timeout for current head of timeout queue
     scheduled* next = &deferred_.front();
-    pn_proactor_set_timeout(proactor_, (next->time-now).milliseconds());
+    pn_millis_t timeout_ms = (now < next->time) ? (next->time-now).milliseconds() : 0;
+    pn_proactor_set_timeout(proactor_, timeout_ms);
 }
 
 void container::impl::client_connection_options(const connection_options &opts) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org