You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2017/11/28 14:47:12 UTC

qpid-dispatch git commit: DISPATCH-887 - Fix race condition that led to connection reopen in spite of connector being deleted

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master b46e5de3d -> e2a05e14e


DISPATCH-887 - Fix race condition that led to connection reopen in spite of connector being deleted


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

Branch: refs/heads/master
Commit: e2a05e14eaa5740cfcd1d6be528ee548aa000441
Parents: b46e5de
Author: Ganesh Murthy <gm...@redhat.com>
Authored: Tue Nov 28 09:46:55 2017 -0500
Committer: Ganesh Murthy <gm...@redhat.com>
Committed: Tue Nov 28 09:46:55 2017 -0500

----------------------------------------------------------------------
 src/connection_manager.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/e2a05e14/src/connection_manager.c
----------------------------------------------------------------------
diff --git a/src/connection_manager.c b/src/connection_manager.c
index 40db56a..b764fff 100644
--- a/src/connection_manager.c
+++ b/src/connection_manager.c
@@ -846,8 +846,11 @@ void qd_connection_manager_delete_connector(qd_dispatch_t *qd, void *impl)
     qd_connector_t *ct = (qd_connector_t*) impl;
     if (ct) {
         sys_mutex_lock(ct->lock);
-        if (ct->ctx && ct->ctx->pn_conn) {
-            qd_connection_invoke_deferred(ct->ctx, deferred_close, ct->ctx->pn_conn);
+        if (ct->ctx) {
+            ct->ctx->connector = 0;
+            if(ct->ctx->pn_conn)
+                qd_connection_invoke_deferred(ct->ctx, deferred_close, ct->ctx->pn_conn);
+
         }
         sys_mutex_unlock(ct->lock);
         DEQ_REMOVE(qd->connection_manager->connectors, ct);


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