From 0995f447cbf07008bcab350219f7b50fa4b9d049 Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Tue, 1 Dec 2020 21:05:45 +0800 Subject: [PATCH] bugfixed: cpool_node object pool must use lock --- .gitignore | 1 + src/connection_pool.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 034e85a..de70dc9 100644 --- a/.gitignore +++ b/.gitignore @@ -53,6 +53,7 @@ src/tests/test_atomic src/tests/test_file_write_hole src/tests/test_file_lock src/tests/test_thread_pool +src/tests/test_data_visible # other *.swp diff --git a/src/connection_pool.c b/src/connection_pool.c index ef1a6c3..5525c30 100644 --- a/src/connection_pool.c +++ b/src/connection_pool.c @@ -57,7 +57,7 @@ int conn_pool_init_ex1(ConnectionPool *cp, int connect_timeout, if ((result=fast_mblock_init_ex1(&cp->node_allocator, "cpool_node", sizeof(ConnectionNode) + sizeof(ConnectionInfo) + extra_data_size, init_capacity, alloc_elements_limit, - NULL, NULL, false)) != 0) + NULL, NULL, true)) != 0) { return result; } -- GitLab