mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-18 19:31:02 +00:00
Squash warning in unit test
This commit is contained in:
1 parent
6ecb6c1500
commit
89beadd2ce
1 file changed
+1
-2
+1
-2
@@ -1029,13 +1029,12 @@ static void test_dns(void) {
|
|||||||
{
|
{
|
||||||
// Test timeout
|
// Test timeout
|
||||||
struct mg_mgr mgr;
|
struct mg_mgr mgr;
|
||||||
struct mg_connection *c;
|
|
||||||
char buf[100] = "";
|
char buf[100] = "";
|
||||||
int i;
|
int i;
|
||||||
mg_mgr_init(&mgr);
|
mg_mgr_init(&mgr);
|
||||||
mgr.dns4.url = "udp://127.0.0.1:12345";
|
mgr.dns4.url = "udp://127.0.0.1:12345";
|
||||||
mgr.dnstimeout = 10;
|
mgr.dnstimeout = 10;
|
||||||
c = mg_http_connect(&mgr, "http://google.com", fn1, buf);
|
mg_http_connect(&mgr, "http://google.com", fn1, buf);
|
||||||
for (i = 0; i < 50 && buf[0] == '\0'; i++) mg_mgr_poll(&mgr, 1);
|
for (i = 0; i < 50 && buf[0] == '\0'; i++) mg_mgr_poll(&mgr, 1);
|
||||||
mg_mgr_free(&mgr);
|
mg_mgr_free(&mgr);
|
||||||
ASSERT(strcmp(buf, "DNS timeout") == 0);
|
ASSERT(strcmp(buf, "DNS timeout") == 0);
|
||||||
|
|||||||
Reference in new issue
Block a user