aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_get_close_keep_alive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_get_close_keep_alive.c')
-rw-r--r--src/testcurl/test_get_close_keep_alive.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/testcurl/test_get_close_keep_alive.c b/src/testcurl/test_get_close_keep_alive.c
index 21461e0d..2350c3fb 100644
--- a/src/testcurl/test_get_close_keep_alive.c
+++ b/src/testcurl/test_get_close_keep_alive.c
@@ -669,8 +669,8 @@ doCurlQueryInThread (struct MHD_Daemon *d,
669 if (0 != getMhdActiveConnections (d)) 669 if (0 != getMhdActiveConnections (d))
670 { 670 {
671 print_test_params (add_hdr_close, add_hdr_k_alive); 671 print_test_params (add_hdr_close, add_hdr_k_alive);
672 fprintf (stderr, 672 fprintf (stderr, "MHD still has active connection "
673 "MHD still has active connection after response has been sent.\n"); 673 "after response has been sent.\n");
674 p->queryError |= 2; 674 p->queryError |= 2;
675 } 675 }
676 } 676 }
@@ -694,13 +694,22 @@ doCurlQueryInThread (struct MHD_Daemon *d,
694 if (use_external_poll) 694 if (use_external_poll)
695 { /* The number of MHD connection can be used only with external poll. 695 { /* The number of MHD connection can be used only with external poll.
696 * otherwise it creates a race condition. */ 696 * otherwise it creates a race condition. */
697 if (1 != getMhdActiveConnections (d)) 697 unsigned int num_conn = getMhdActiveConnections (d);
698 if (0 == num_conn)
698 { 699 {
699 print_test_params (add_hdr_close, add_hdr_k_alive); 700 print_test_params (add_hdr_close, add_hdr_k_alive);
700 fprintf (stderr, 701 fprintf (stderr, "MHD has no active connection "
701 "MHD has no active connection after response has been sent.\n"); 702 "after response has been sent.\n");
702 p->queryError |= 2; 703 p->queryError |= 2;
703 } 704 }
705 else if (1 != num_conn)
706 {
707 print_test_params (add_hdr_close, add_hdr_k_alive);
708 fprintf (stderr, "MHD has wrong number of active connection (%u) "
709 "after response has been sent. Line: %d\n", num_conn,
710 __LINE__);
711 _exit (23);
712 }
704 } 713 }
705 } 714 }
706 curl_easy_cleanup (c); 715 curl_easy_cleanup (c);