[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 01/03: test_get_close_keep_alive: minor reporting improv
From: |
gnunet |
Subject: |
[libmicrohttpd] 01/03: test_get_close_keep_alive: minor reporting improvment |
Date: |
Wed, 18 Aug 2021 09:25:15 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 02af598a814e7204f8b2ba7f90976ef35e43f174
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Aug 18 10:13:36 2021 +0300
test_get_close_keep_alive: minor reporting improvment
---
src/testcurl/test_get_close_keep_alive.c | 19 ++++++++++++++-----
1 file 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,
if (0 != getMhdActiveConnections (d))
{
print_test_params (add_hdr_close, add_hdr_k_alive);
- fprintf (stderr,
- "MHD still has active connection after response has been
sent.\n");
+ fprintf (stderr, "MHD still has active connection "
+ "after response has been sent.\n");
p->queryError |= 2;
}
}
@@ -694,13 +694,22 @@ doCurlQueryInThread (struct MHD_Daemon *d,
if (use_external_poll)
{ /* The number of MHD connection can be used only with external poll.
* otherwise it creates a race condition. */
- if (1 != getMhdActiveConnections (d))
+ unsigned int num_conn = getMhdActiveConnections (d);
+ if (0 == num_conn)
{
print_test_params (add_hdr_close, add_hdr_k_alive);
- fprintf (stderr,
- "MHD has no active connection after response has been
sent.\n");
+ fprintf (stderr, "MHD has no active connection "
+ "after response has been sent.\n");
p->queryError |= 2;
}
+ else if (1 != num_conn)
+ {
+ print_test_params (add_hdr_close, add_hdr_k_alive);
+ fprintf (stderr, "MHD has wrong number of active connection (%u) "
+ "after response has been sent. Line: %d\n", num_conn,
+ __LINE__);
+ _exit (23);
+ }
}
}
curl_easy_cleanup (c);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.