Repository: qpid-dispatch Updated Branches: refs/heads/master 2bbeefafe -> ab4e96c8c
DISPATCH-739: Drain core work list on shutdown Fix leaks of unprocessed work items Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/ab4e96c8 Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/ab4e96c8 Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/ab4e96c8 Branch: refs/heads/master Commit: ab4e96c8c226dad9bfee23bdd86f53bb8b2172aa Parents: 2bbeefa Author: Alan Conway <[email protected]> Authored: Thu Apr 20 14:05:02 2017 -0400 Committer: Alan Conway <[email protected]> Committed: Thu Apr 20 14:05:02 2017 -0400 ---------------------------------------------------------------------- src/router_core/router_core.c | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/ab4e96c8/src/router_core/router_core.c ---------------------------------------------------------------------- diff --git a/src/router_core/router_core.c b/src/router_core/router_core.c index 1733b90..9fd47ae 100644 --- a/src/router_core/router_core.c +++ b/src/router_core/router_core.c @@ -103,6 +103,9 @@ void qdr_core_free(qdr_core_t *core) sys_cond_signal(core->action_cond); sys_thread_join(core->thread); + // Drain the general work lists + qdr_general_handler(core); + // // Free the core resources // @@ -112,6 +115,8 @@ void qdr_core_free(qdr_core_t *core) sys_mutex_free(core->work_lock); sys_mutex_free(core->id_lock); qd_timer_free(core->work_timer); + + //we can't call qdr_core_unsubscribe on the subscriptions because the action processing thread has //already been shut down. But, all the action would have done at this point is free the subscriptions //so we just do that directly. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
