Report active resources when callback teardown is unbalanced

This commit is contained in:
evgeny committed 2026-10-23 21:54:15 +02:00
1 parent 4614577d19
commit 1fb52d3f5b
1 file changed
+4
+4
View File
@@ -339,6 +339,10 @@ static void callback_close_case(int reality, int side, unsigned action, unsigned
etcp_conn_ref_free(test.retained);
for (int i = 0; i < 2; i++) if (endpoints[i].inst) stop_endpoint(i);
uasync_drain_immediate(ua);
if (ua->timer_alloc_count != ua->timer_free_count || ua->socket_alloc_count != ua->socket_free_count) {
debug_set_category_level(DEBUG_CATEGORY_SYS, DEBUG_LEVEL_INFO);
uasync_print_resources(ua, "callback close imbalance");
}
CHECK(ua->timer_alloc_count == ua->timer_free_count && ua->socket_alloc_count == ua->socket_free_count);
uasync_destroy(ua, 0);
CHECK(u_get_allocated_count() == allocated);