diff options
Diffstat (limited to 'src/testcurl/test_iplimit.c')
-rw-r--r-- | src/testcurl/test_iplimit.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/testcurl/test_iplimit.c b/src/testcurl/test_iplimit.c index cf06a972..0a96a3ba 100644 --- a/src/testcurl/test_iplimit.c +++ b/src/testcurl/test_iplimit.c | |||
@@ -44,6 +44,13 @@ | |||
44 | #include <windows.h> | 44 | #include <windows.h> |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | #if defined(CPU_COUNT) && (CPU_COUNT+0) < 2 | ||
48 | #undef CPU_COUNT | ||
49 | #endif | ||
50 | #if !defined(CPU_COUNT) | ||
51 | #define CPU_COUNT 2 | ||
52 | #endif | ||
53 | |||
47 | static int oneone; | 54 | static int oneone; |
48 | 55 | ||
49 | struct CBC | 56 | struct CBC |
@@ -208,7 +215,7 @@ testMultithreadedPoolGet () | |||
208 | d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, | 215 | d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, |
209 | 1081, NULL, NULL, &ahc_echo, "GET", | 216 | 1081, NULL, NULL, &ahc_echo, "GET", |
210 | MHD_OPTION_PER_IP_CONNECTION_LIMIT, 2, | 217 | MHD_OPTION_PER_IP_CONNECTION_LIMIT, 2, |
211 | MHD_OPTION_THREAD_POOL_SIZE, 4, | 218 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, |
212 | MHD_OPTION_END); | 219 | MHD_OPTION_END); |
213 | if (d == NULL) | 220 | if (d == NULL) |
214 | return 16; | 221 | return 16; |