qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmur...@apache.org
Subject qpid-dispatch git commit: DISPATCH-887 - Fix race condition that led to connection reopen in spite of connector being deleted
Date Fri, 16 Feb 2018 18:51:40 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/1.0.x ae87d1c06 -> afb1b82d5


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

(cherry picked from commit e2a05e14eaa5740cfcd1d6be528ee548aa000441)


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

Branch: refs/heads/1.0.x
Commit: afb1b82d547b96366545038416b1e4a71607d499
Parents: ae87d1c
Author: Ganesh Murthy <gmurthy@redhat.com>
Authored: Tue Nov 28 09:46:55 2017 -0500
Committer: Ganesh Murthy <gmurthy@redhat.com>
Committed: Fri Feb 16 13:47:41 2018 -0500

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


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/afb1b82d/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


Mime
View raw message