You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2017/07/21 16:52:56 UTC

[2/2] qpid-proton git commit: PROTON-1524: Fix libuv proactor timer tracking

PROTON-1524: Fix libuv proactor timer tracking


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

Branch: refs/heads/master
Commit: f6d464822b154531d0d4005a4e5144b9a45ff9f3
Parents: e6aaadb
Author: Andrew Stitcher <as...@apache.org>
Authored: Fri Jul 21 12:48:31 2017 -0400
Committer: Andrew Stitcher <as...@apache.org>
Committed: Fri Jul 21 12:50:06 2017 -0400

----------------------------------------------------------------------
 proton-c/src/proactor/libuv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f6d46482/proton-c/src/proactor/libuv.c
----------------------------------------------------------------------
diff --git a/proton-c/src/proactor/libuv.c b/proton-c/src/proactor/libuv.c
index c0a4d8d..c70dbe7 100644
--- a/proton-c/src/proactor/libuv.c
+++ b/proton-c/src/proactor/libuv.c
@@ -1118,8 +1118,9 @@ void pn_proactor_disconnect(pn_proactor_t *p, pn_condition_t *cond) {
 void pn_proactor_set_timeout(pn_proactor_t *p, pn_millis_t t) {
   uv_mutex_lock(&p->lock);
   p->timeout = t;
+  // This timeout *replaces* any existing timeout
+  if (p->timeout_state == TM_NONE) ++p->active;
   p->timeout_state = TM_REQUEST;
-  ++p->active;
   uv_mutex_unlock(&p->lock);
   notify(p);
 }


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