This is an automated email from the ASF dual-hosted git repository. kgiusti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/main by this push: new b58ce50 DISPATCH-2333: fix incorrect assertion check b58ce50 is described below commit b58ce50bee634e4dd2155d19ae68ad5184eea0ed Author: Kenneth Giusti <kgiu...@apache.org> AuthorDate: Mon Feb 21 14:27:51 2022 -0500 DISPATCH-2333: fix incorrect assertion check This closes #1528 --- src/policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/policy.c b/src/policy.c index 5830b35..3d83cba 100644 --- a/src/policy.c +++ b/src/policy.c @@ -288,9 +288,9 @@ bool qd_policy_socket_accept(qd_policy_t *policy, const char *hostname) void qd_policy_socket_close(qd_policy_t *policy, const qd_connection_t *conn) { sys_mutex_lock(stats_lock); + assert (n_connections > 0); n_connections--; uint64_t nc = n_connections; - assert (n_connections >= 0); sys_mutex_unlock(stats_lock); if (policy->enableVhostPolicy) { // HACK ALERT: TODO: This should be deferred to a Python thread --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org