Repository: qpid-proton Updated Branches: refs/heads/master bc6014057 -> 72b7ea050
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/master Commit: f76f28927e176b5b994d865a19e54f25d9708eb3 Parents: bc60140 Author: Alan Conway <acon...@redhat.com> Authored: Fri Oct 13 14:39:42 2017 +0100 Committer: Alan Conway <acon...@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-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org